P. Taylor Goetz

bytes from /dev/random

Upgrading RVM on OSX

I recently had the need to install a newer version of ruby, since I hadn’t updated in ages (I was on ruby-1.9.2-p290). For something I was working on I needed ruby-1.9.3-rc1.

Simple right? Just run

1
rvm install ruby-1.9.3-rc1

Well, not so much… Running that with an old rvm install led to nothing but cryptic hurt.

As it turns out, RVM has undergone some serious updates as well as a move to the .io TLD. I’m running OSX and using homebrew, so the first order of business was to update homebrew:

1
brew update

The next step is to install the new/latest version of RVM:

1
curl -L https://get.rvm.io | bash -s stable

That got me a bit closer, but running rvm install ruby-1.9.3-rc1 failed, but RVM was kind enough to let me know what was missing. So the next step was:

1
brew install libyaml libxml2 libxslt libksba openssl sqlite

Even closer… but still no love. The next step was to tell RVM to take care of any dependencies it needs, including installing homebrew if necessary (https://rvm.io/rvm/autolibs/)

1
rvm autolibs enable

Success! Now I was able to install ruby-1.9.3-rc1, migrate the gems I had installed under ruby-1.9.2-p290, and tell RVM to use ruby-1.9.3-rc1:

1
2
3
rvm install ruby-1.9.3-rc1
rvm migrate ruby-1.9.2-p290 ruby-1.9.3-rc1
rvm use ruby-1.9.3-rc1

Comments