Installing Ruby 1.9.2 via rvm on OS X

It took me a bit of digging to figure this out (it kept failing with readline errors, and then iconv went missing), so I thought I’d share:

rvm package install readline
rvm package install iconv
rvm install 1.9.2 -C --enable-shared,--with-iconv-dir=$HOME/.rvm/usr,\
--with-readline-dir=$HOME/.rvm/usr

Update: The package command has been renamed pkg in newer versions of rvm.

Tweet