0

从 rails 2.3.5 升级后,尝试为我的 rails 2.3.15 应用程序启动脚本/控制台时出现以下错误。这是否意味着问题在于 bundler 1.2.1 与 rack 1.1.3 不兼容?任何帮助将不胜感激。

usr/lib/ruby/gems/1.8/gems/bundler-1.2.1/lib/bundler/rubygems_integration.rb:157:in gem': can't activate rack (~> 1.0.1), already activated rack-1.1.3. Make sure all dependencies are added to Gemfile. (Gem::LoadError) from /home/developer/bigpink/vendor/rails/actionpack/lib/action_controller.rb:34 from /home/developer/bigpink/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:inrequire' 来自 /home/developer/bigpink/vendor/rails/activesupport/lib/active_support/dependencies .rb:156:in require' from /home/developer/bigpink/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:innew_constants_in' from /home/developer/bigpink/vendor/rails/activesupport/lib/active_support/dependencies.rb:156:in require' from /home/developer/bigpink/vendor/rails/railties/lib/commands/server.rb:2 from script/server:3:inrequire' from script/server:3

4

2 回答 2

0

就我而言,问题通过以下步骤解决:

  1. 删除了目录$PROJECT_ROOT/vendor/rails
  2. 修改RAILS_GEM_VERSIONconfig/environment.rb
于 2013-01-11T06:16:00.937 回答
-1

我们使用这个过程在我们的 Heroku 应用程序上将 Rails 升级到 3.2.11(如此处所报告

stop – your Ruby on Rails (RoR) server
edit  – appropriate line in gem file to read [one of]:
    gem ‘rails’, ’3.2.11′
    gem ‘rails’, ’3.1.10′
    gem ‘rails’, ’3.0.19′
    gem ‘rails’, ’2.3.15′

run – gem update
run – bundle update
run - bundle install

test – rspec # or test-driven dev’t framework of choice
launch – rails s
test – # interact with Rails server & explore if all is well

run – git add .
run – git commit -a -m “upgrade Rails server to ver. [x.y.z]“
run - git push # to github or rcs of choice
run - git push heroku # or to deployment server of choice
于 2013-01-11T16:23:50.063 回答