Primeiro desinstale o Xcode:
$ sudo /Developer/Library/uninstall-devtools --mode=all
Baixe as ferramentas de linha de comando oficiais da Apple: https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=d4f7d769c2abecc664d0dadfed6a67f943442b5e9c87524d4587a95773750cea%5Fownload2Fownload2Fownload
$ brew update
$ brew install autoconf automake
$ brew install https://raw.github.com/Homebrew/homebrew-dupes/master/apple-gcc42.rb
$ rvm get head
$ rvm install 1.9.3-head