Last Updated: February 25, 2016
·
1.752K
· anthonator

Installing Ruby 2.0.0 with rbenv on Mountain Lion

Remember when rbenv just worked on OS X? No make, no autoconf, no configuration options. Those were the days. Unfortunately, there seems to be a problem with Mountain Lion's distribution of OpenSSL which prevents Ruby 2 from compiling. We'll have to fix that.

Requirements

Installing OpenSSL

We're using Homebrew for installing OpenSSL. I know some people are against package manager type tools but this is the easiest and quickest way to reach our end goal.

To get Homebrew to install OpenSSL just run the command:

brew install openssl

BAM! Done!

Install Ruby 2.0.0

Make sure you have rbenv, rbenv-build and Xcode command line tools installed and configured. Then just run the command:

RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl)" rbenv install 2.0.0-p247

Pretty simple! Keep on keepin' on!