I had Rails 2.0.2 before i started my upgrade. When i executed the typical “sudo gem install rails”, i got the following error:
Bulk updating Gem source index for: http://gems.rubyforge.org/
Updating metadata for 13 gems from http://gems.rubyonrails.org/
………….
complete
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: Error installing rails:
invalid gem format for /Library/Ruby/Gems/1.8/cache/activesupport-2.1.0.gem
Steps to fix this:
- Remove all old activesupport gems from your Library
sudo rm -rf /Library/Ruby/Gems/1.8/cache/activesupport-2.1.0.gem
sudo rm -rf /Library/Ruby/Gems/1.8/cache/activesupport-2.0.2.gem
sudo rm -rf /Library/Ruby/Gems/1.8/cache/activesupport-2.0.991.gem - sudo gem update
- sudo gem install rails
Comments (3)
Many thanks! This solved my problem upgrading from Rails 2.0.2 to 2.1.
Thanks a lot. You saved me live
Amazing, thank you so much for this!