Upgrading from Rails version 1.2.3 to version 2.0.2.
Following the suggestion in DH’s weblog here when using sudo gem install rails -y, it gets the trunk version of rails which at the time was 18.104.22.16816.
This causes a few problems and breaks a few more things.
In order to get back to the latest stable version, you have to uninstall a few of the gems installed from the trunk version.
If you have installed the latest version of top of an existing one using gems, then doing:
gem list --local
will give you all the installed versions of the gems. Something like:
actionmailer (22.214.171.12416, 2.0.2, 1.3.3) actionpack(126.96.36.19916, 2.0.2, 1.3.3) rails(188.8.131.5216, 2.0.2, 1.2.3) ...
Make sure you uninstall all the gems with version number 184.108.40.20616:
sudo gem uninstall rails sudo gem uninstall actionmailer sudo gem uninstall actionpack sudo gem uninstall activerecord sudo gem uninstall activeresource sudo gem uninstall activesupport sudo gem uninstall rails
In each of the above commands the gem package manager should ask you to select the one you want to uninstall.
Pick the one with the 220.127.116.1116 (or other version later than 2.0.2).
At the end if you list the gems again you should only have gems going up to version 2.0.2
An extra step I had to take for making the migrations work was to install rake again:
sudo gem install rake
After all these my installation seems to be working fine again.