Tuesday, May 28, 2013

Installing Ruby 2.0.0 with RVM and without Homebrew

Yes, I said "without Homebrew". I'm a MacPorts guy and have been for awhile so my MBP is laden with  MacPorts managed packages.  I actually have Homebrew installed, but have only used it once. So you can flame all you want, but unless you want to redo my entire machine, layoff.

With that aside I ran into problems using rvm to install 2.0.0 because it wanted to install dependencies using Homebrew, dependencies which I had already installed using MacPorts. Of course I didn't want to uninstall MacPorts and it's packages and let Homebrew handle everything, especially just for openssl to be compiled by Homebrew. Until today (last attempt was 3 weeks ago) I could not get around the Homebrew requirement and it's for one of two reasons, which I have not verified. Either rvm stopped forcing homebrew in their last update (not likely) or the rvm pkg command allows the default package manager to run vs forcing homebrew (more likely) (I had not previously tried rvm pkg to install dependencies).

In the end, here is what I needed to do. (Note, I already had Ruby 1.9.3 and it's dependencies installed)

rvm get stable
rvm pkg install openssl
rvm install 2.0.0 --with-openssl-dir=$HOME/.rvm/usr --verify-downloads 1
rvm use 2.0.0