Next we'll install some packages that various Ruby versions depends on.
brew install openssl readline zlib libyaml
Now install the apple-gcc42 compiler to be able to install versions of Ruby that are older than 1.9.3.
brew tap homebrew/dupes brew install apple-gcc42
Next install ruby-build so we can start installing Ruby implementations and versions on our machine.
export PATH=$HOME/local/ruby-build/bin:$PATH
export RUBY_VERSIONS=$HOME/local/ruby/versions source $HOME/Dropbox/projects/ruby-version/ruby-version.sh && ruby-version ruby-1.9.3-rc1 >/dev/null
CONFIGURE_OPTS=--with-openssl-dir=brew --prefix openssl