Last Updated: February 25, 2016
·
381
· peterb

How to install Ruby 2.0 on OS X

It's simple

Installation is simple, don't let complicated tips fool you!

Assumptions

You have already installed Homebrew and RVM.

Installation

rvm get stable
rvm install ruby

Caveats

OpenSSL

If you have problems when Homebrew tries to install OpenSSL run

sudo chown -R `whoami` /usr/local/etc/openssl

for further details about build issues with Homebrew and Make, see https://gist.github.com/devinbrown/5084433

.rvmrc and .ruby-version

rvm rvmrc to rubyversion

After installing Ruby you may have to switch from using .rvmrc to .ruby-version in order to avoid this kind of warning:

$ rvm rvmrc to ruby-version
You are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers, you can switch to '.ruby-version' using 'rvm rvmrc to [.]ruby-version'
or ignore this warnings with 'rvm rvmrc warning ignore /Users/peter/Code/profes19/.rvmrc',
'.rvmrc' will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run 'rvm rvmrc warning ignore all.rvmrcs'.