Resident Demigod

Veezus Kreist

Divine missives

Specifying an older rubygems version with RVM (updated)

March 16, 2010 17:15

Updated with user-based configuration – thanks, Wayne

I’ve recently been in the uncomfortable position of trying to work on rspec-rails (which requires rubygems 1.3.6) and a legacy app that Hashrocket has been maintaining (which works with 1.3.5 or earlier). I’d been hearing about RVM and decided to give that a whirl.

However, by default, RVM was installing rubygems 1.3.6. After a little bit of struggling, I found the place to change the default rubygems version to install. In ~/.rvm/config/user, add the following line:

rubygems_version=1.3.5

This will override the default setting in ~/.rvm/config/db. Install a new ruby and check your gem version:

rvm install 1.8.7-p174

rvm gem -v