pre-1.9.3 Ruby on Mountain Lion
Xcode Command Line Tools
XQuartz 2.7.2 or later.
rbenv/ruby-build or RVM.
Note, the Xcode Command Line Tools do not include GCC, they include LLVM-GCC. Same-same, but different.
$ brew tap homebrew/dupes
$ brew install apple-gcc42
Add the following to your ~/.profile or equivalent:
And reload your shell before attempting the install commands below.
CFLAGS="-I/opt/X11/include" rvm reinstall ree
Prefix the install command with CFLAGS="-I/opt/X11/include"
Then to set your new ruby as default:
user$ rvm use 1.9.2 --default
Then check your ruby version:
user$ ruby -v