3

将 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.
4

1 回答 1

2

我将捆绑器降级到 1.1.5 以“解决”这个问题:

gem uninstall bundler
gem install bundler -v 1.1.5
于 2012-10-22T09:56:19.137 回答