How do you downgrade rubygems?

Solution 1:

This worked for me when downgrading from 1.5.2 to 1.4.2 because of old rails version:

sudo gem update --system 1.4.2

More information about downgrading/upgrading rubygems: https://github.com/rubygems/rubygems/blob/master/UPGRADING.md

Solution 2:

Updated November 2011: Now that RVM's out, try running rvm install rubygems <version>.

Solution 3:

If you're using RVM, then you can do this to remove current ruby gems, then upgrade/downgrade rubygems:

rvm install rubygems 1.4.2