1.Check your ruby version
ruby -v
2.Install rvm
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
3.Install homedrew
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
4.Reload your shell environment:
source ~/.bash_profile
5.Find the requirements (follow the instructions):
rvm requirements
6.Verify RVM
type rvm | head -n1
7.install autoconf
brew install automake
8.Install ruby:
rvm install 1.9.3 (or rvm install 1.9.3 --with-gcc=clang)
9.Verify ruby version
ruby -v