Rails 2.3.5 gem update (dependency errors fi

系统 1537 0
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

Rails 2.3.5 gem update (dependency errors fixed)


更多文章、技术交流、商务合作、联系博主

微信扫码或搜索:z360901061

微信扫一扫加我为好友

QQ号联系: 360901061

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描下面二维码支持博主2元、5元、10元、20元等您想捐的金额吧,狠狠点击下面给点支持吧,站长非常感激您!手机微信长按不能支付解决办法:请将微信支付二维码保存到相册,切换到微信,然后点击微信右上角扫一扫功能,选择支付二维码完成支付。

【本文对您有帮助就好】

您的支持是博主写作最大的动力,如果您喜欢我的文章,感觉我的文章对您有帮助,请用微信扫描上面二维码支持博主2元、5元、10元、自定义金额等您想捐的金额吧,站长会非常 感谢您的哦!!!

发表我的评论
最新评论 总共0条评论