Ruby Environment on Mavericks

Prerequisite

  • Homebrew
  • openssl, readline, rbenv, ruby-build
brew install readline openssl rbenv ruby-build rbenv-gem-rehash

Ruby 2.X

You may want to refer to these issues for more details on installing 2.X:

Here I prefer the following:

curl -fsSL https://gist.github.com/EdVanDance/9738787.txt | RUBY_CONFIGURE_OPTS="--with-readline-dir=$(brew --prefix readline) --with-openssl-dir=$(brew --prefix openssl) --with-gcc=clang" rbenv install --patch 2.0.0-p451

Then set as default and install some utils:

rbenv global 2.0.0-p451
rbenv rehash
gem install bundler
rbenv rehash