【问题标题】:Trouble upgrading to rails 2.3.15 with rack 1.1.3使用机架 1.1.3 升级到 rails 2.3.15 时遇到问题
【发布时间】:2013-01-11 03:35:27
【问题描述】:

从 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' 来自/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' 来自脚本/服务器:3

【问题讨论】:

    标签: rack


    【解决方案1】:

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

    1. 已删除目录$PROJECT_ROOT/vendor/rails
    2. config/environment.rb 中修改了RAILS_GEM_VERSION

    【讨论】:

    • 你是不是修改成了这个? RAILS_GEM_VERSION = '2.3.15' 除非定义? RAILS_GEM_VERSION
    • 我最终不得不使用补丁,因为我无法轻松升级到新版本的 Rails。在此处获取补丁:groups.google.com/forum/?fromgroups=#!topic/…
    【解决方案2】:

    我们使用这个过程在我们的 Heroku 应用程序上将 Rails 升级到 3.2.11(据报道 here

    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
    

    【讨论】:

    • 谢谢,Aghilmort。但这些是我遵循的确切步骤,除了服务器最终无法启动并给出我粘贴的错误以启动此线程。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-01-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多