I recently had to so simple. I gathered a lot of toughness with the installed ruby and gem system and wanted to clear it all and move everything to work under rvm for various projects.
1. Clean old and damaged
The first thing I did before messing with rvm (or starting the rvm system to get back to the ruby system) was to remove all my gems :
gem list | cut -d" " -f1 | xargs gem uninstall -aIx
WARNING: this will remove all ruby gems. If you installed it as root, you can switch to root and start it.
2. Set a new hotness
Now you can run the gem list to see what is left.
Rvm installation time, I recommend blowing off your current installation and installing a new one again:
rm -rf $HOME/.rvm bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
Now the real trick is to use gemsets to set rails 3, and this is easy if you follow the Wayne Seguin gist :
rvm update --head rvm install 1.8.7 rvm --create use 1.8.7@rails3 curl -L http://rvm.beginrescueend.com/gemsets/rails3b3.gems -o rails3b3.gems rvm gemset import rails3b3.gems
One difference is that I am using 1.8.7, since I had problems with 1.9.2-head and RSpec, but 1.8.7 was smooth.
source share