将Rails升级到3.2.8后,我在创建新应用时出现此错误:
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler/source.rb:271: uninitialized constant Bundler::GemInstaller (NameError)
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler/dsl.rb:21:in `initialize'
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler/dsl.rb:6:in `new'
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler/dsl.rb:6:in `evaluate'
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler/definition.rb:18:in `build'
/usr/lib/ruby/vendor_ruby/bundler.rb:136:in `definition'
/usr/lib/ruby/vendor_ruby/bundler/cli.rb:222:in `install'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor/task.rb:22:in `send'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor/task.rb:22:in `run'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor.rb:246:in `dispatch'
/usr/lib/ruby/vendor_ruby/bundler/vendor/thor/base.rb:389:in `start'
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/bin/bundle:14
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors'
/usr/lib/ruby/gems/1.8/gems/bundler-1.2.0/bin/bundle:14
There was an error in your Gemfile, and Bundler cannot continue.
答案 0 :(得分:2)
我将捆绑商降级到1.1.5,以解决"解决"这样:
gem uninstall bundler
gem install bundler -v 1.1.5