How to Install Ruby 1.9.3 for Mac OSX 10.8+ with MacPorts and RVM

Posted on September 30, 2013

Need to install Ruby 1.9.3 with RVM on Mac OSX? Here is a very clean and simple procedure to get it working using MacPorts. Special thanks to Calvin's design and hacks blog for this awesome guide.


Before we start

Make sure you install the following:

The Code

Run the following commands from your OSX terminal

sudo port selfupdate -v
sudo port upgrade outdated
sudo port install apple-gcc42
sudo port install gmake
sudo port install gpatch
sudo port install binutils
sudo port select --set gcc apple-gcc42
sudo ln -s /opt/local/bin/gmake /opt/local/bin/make
sudo ln -s /opt/local/bin/gpatch /opt/local/bin/patch
sudo port install curl
curl -L | bash -s stable


Seriously. Reboot.

sudo reboot

Install RVM

rvm pkg install readline
rvm install 1.9.3 --with-readline-dir=${HOME:-~}/.rvm/usr

Setting and testing the Default RVM

I ran into a situation where my RVM was trying to use a different version of Ruby. In order to confirm that we're using the right version, it's safer to set the default.

rvm --default use 1.9.2

Test it with the following

rvm -v

Leave a Reply

Your email address will not be published.

Contact Us

Have a question? Send us a message. We'll get back to you soon.