【问题标题】:Rails 3 - Bundle install not working anymore... a sqlite3 problem!Rails 3 - 捆绑安装不再工作...... sqlite3 问题!
【发布时间】:2011-04-19 14:57:12
【问题描述】:

几分钟前我做了一个

bundle install git://github.com/vigetlabs/serialize_with_options.git

现在每次我尝试进行“捆绑安装”时都会收到此错误:

> MacBook-di-Andrea:village abramo$
> bundle install http://rubygems.org
> Fetching source index for
> http://rubygems.org/ Installing rake
> (0.8.7)  Installing abstract (1.0.0) 
> Installing activesupport (3.0.5) 
> Installing builder (2.1.2)  Installing
> i18n (0.5.0)  Installing activemodel
> (3.0.5)  Installing erubis (2.6.6) 
> Installing rack (1.2.1)  Installing
> rack-mount (0.6.13)  Installing
> rack-test (0.5.7)  Installing tzinfo
> (0.3.24)  Installing actionpack
> (3.0.5)  Installing mime-types (1.16) 
> Installing polyglot (0.3.1) 
> Installing treetop (1.4.9)  Installing
> mail (2.2.15)  Installing actionmailer
> (3.0.5)  Installing arel (2.0.9) 
> Installing activerecord (3.0.5) 
> Installing activeresource (3.0.5) 
> Installing xml-simple (1.0.14) 
> Installing aws-s3 (0.6.2)  Using
> bundler (1.0.10)  Installing paperclip
> (2.3.8)  Installing thor (0.14.6) 
> Installing railties (3.0.5) 
> Installing rails (3.0.5)  Installing
> sqlite3 (1.3.3) with native extensions
> /Users/abramo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:529:in
> `rescue in block in build_extensions':
> ERROR: Failed to build gem native
> extension.
> (Gem::Installer::ExtensionBuildError)
> 
>         /Users/abramo/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
> extconf.rb  checking for sqlite3.h...
> yes checking for
> sqlite3_libversion_number() in
> -lsqlite3... yes checking for rb_proc_arity()... yes checking for
> sqlite3_initialize()... yes checking
> for sqlite3_next_stmt()... yes
> checking for sqlite3_backup_init()...
> yes checking for
> sqlite3_column_database_name()... no
> checking for
> sqlite3_enable_load_extension()... no
> checking for
> sqlite3_load_extension()... no
> creating Makefile
> 
> make Makefile:148: *** target pattern
> contains no `%'.  Stop.
> 
> 
> Gem files will remain installed in
> /Users/abramo/village/http:/rubygems.org/ruby/1.9.1/gems/sqlite3-1.3.3
> for inspection. Results logged to
> /Users/abramo/village/http:/rubygems.org/ruby/1.9.1/gems/sqlite3-1.3.3/ext/sqlite3/gem_make.out
>   from
> /Users/abramo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:507:in
> `block in build_extensions'   from
> /Users/abramo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:482:in
> `each'    from
> /Users/abramo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:482:in
> `build_extensions'    from
> /Users/abramo/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:156:in
> `install'     from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/source.rb:96:in
> `install'     from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/installer.rb:55:in `block in run'     from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in
> `block in each'   from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in
> `each'    from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in
> `each'    from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/installer.rb:44:in `run'  from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in
> `install'     from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in
> `install'     from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in
> `run'     from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in
> `invoke_task'     from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch'  from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in
> `start'   from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/gems/bundler-1.0.10/bin/bundle:13:in
> `<top (required)>'    from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/bin/bundle:19:in
> `load'    from
> /Users/abramo/.rvm/gems/ruby-1.9.2-p180/bin/bundle:19:in
> `<main>'

你知道如何解决这个问题吗?谢谢!

【问题讨论】:

  • 请将问题标题编辑为更具体的内容
  • 好的,完成!希望有人能帮我解决这个问题!

标签: ruby-on-rails


【解决方案1】:

我通过删除项目文件夹中的一个文件夹解决了这个问题。我删除了几个隐藏文件夹。因此,如果您(并且您使用的是 OS X)发生类似的事情,只需在终端中输入:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

之后,您将在 Finder 中看到隐藏文件夹。进入你的项目文件夹,将隐藏的文件夹一一删除,找出问题的根源。

【讨论】:

  • 非常感谢。我遇到了同样的问题,我通过删除应用程序中的 .bundle 文件夹来修复它。
  • 我还通过删除 .bundle 文件夹来修复它...似乎中止的 gem install 损坏了该文件夹中的配置文件...我删除了它并运行 bundle install.. 快乐的日子!
【解决方案2】:

似乎这是一个 sqlite3 安装问题,检查这个线程,希望你也有同样的问题

How do I install SQlite3 for Ruby on Rails while using RVM

HTH

干杯

同人

【讨论】:

  • 您好,感谢您的回答!我自己想出了如何解决我的错误,这是另一个问题
猜你喜欢
  • 1970-01-01
  • 2012-02-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-10-02
  • 2017-10-31
相关资源
最近更新 更多