加载我的 Rails 应用程序时收到以下错误消息:
You have already activated builder 3.0.4, but your Gemfile requires builder 3.0.3. Consider using bundle exec.
堆栈跟踪:
0 /usr/local/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/runtime.rb 31 in `block in setup'
1 /usr/local/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/spec_set.rb 12 in `block in each'
2 /usr/local/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/spec_set.rb 12 in `each'
3 /usr/local/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/spec_set.rb 12 in `each'
4 /usr/local/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/runtime.rb 17 in `setup'
5 /usr/local/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler.rb 107 in `setup'
6 /usr/local/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/lib/phusion_passenger/utils.rb 326 in `prepare_app_process'
7 /usr/local/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/lib/phusion_passenger/classic_rails/application_spawner.rb 176 in `block in initialize_server'
8 /usr/local/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/lib/phusion_passenger/utils.rb 563 in `report_app_init_status'
9 /usr/local/ruby/1.9.2/lib/ruby/gems/1.9.1/gems/passenger-3.0.17/lib/phusion_passenger/classic_rails/application_spawner.rb 174 in `initialize_server'
似乎已passenger
激活3.0.4
,但我的应用程序 Gemfile 仍然具有3.0.3
. 我可以添加gem 'builder', '3.0.4'
我的 Gemfile,但当新版本出现时它会再次发生。我怎样才能防止这种情况发生?