`
nnnnon
  • 浏览: 147850 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Rails 2.3.5 gem update (dependency errors fixed)

阅读更多
I recently updated my rails gem and realised i was getting errors trying to create new rails projects in 2.3.5, below is the error i was getting.

    /Library/Ruby/Site/1.8/rubygems.rb:827:in `report_activate_error’: RubyGem version error: rack(1.0.0 not ~> 1.0.1) (Gem::LoadError)
    from /Library/Ruby/Site/1.8/rubygems.rb:261:in `activate’
    from /Library/Ruby/Site/1.8/rubygems.rb:68:in `gem’
    from /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller.rb:34
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require’
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in’
    from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require’
    from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:2
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’
    from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’
    from ./script/server:3

    /Library/Ruby/Site/1.8/rubygems.rb:827:in `report_activate_error’: RubyGem version error: rack(1.0.0 not ~> 1.0.1) (Gem::LoadError) from /Library/Ruby/Site/1.8/rubygems.rb:261:in `activate’ from /Library/Ruby/Site/1.8/rubygems.rb:68:in `gem’ from /Library/Ruby/Gems/1.8/gems/actionpack-2.3.5/lib/action_controller.rb:34 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’ from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’ from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require’ from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in’ from /Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require’ from /Library/Ruby/Gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:2 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require’ from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require’ from ./script/server:3

I went through a few debug modes checked but came up with no lasting solution. I finally checked for my installed gems “sudo gem list” and realised i had “Rack 1.0.0″ installed and I upgraded my rack version with the command “sudo gem update rack” I rechecked my gem list and realised i now i had Rack 1.0.0 and Rack 1.1.0 installed. Great! right? tried to launch my project again and I saw the same errors again, Uhh! Took another closer look again a realised somehow it depended more or less on Rack 1.0.1 which has been skipped by the update to the lastest version of Rack. So this meant we have to install that particular version of rack. I used the following command

    sudo gem install -v=1.0.1 rack

Rechecked my rack verisons and now I had all three verisons, tried my project again and behold Rails was booting nicely
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics