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
??? /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

更多文章、技術交流、商務合作、聯系博主
微信掃碼或搜索:z360901061

微信掃一掃加我為好友
QQ號聯系: 360901061
您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。
【本文對您有幫助就好】元
