I got rid of all the developer tools on my Mac to clean up the messed up environment from countless experiments.
sudo /Developer/Library/uninstall-devtools –mode=all
rm -f /Developer
These commands got rid of everything.
Then I got rid of MacPorts
sudo port -fp uninstall –follow-dependents installed
sudo rm -rf \> /opt/local \
Get this from the Mac App Store.
2. Command Line Tools For OS X – https://developer.apple.com/downloads/index.action?=command%20line%20tools
Command Line Toosl gives you gcc, the lexical parsers, linkers etc for compiling binaries.
3. Installed RVM with instructions from http://beginrescueend.com/
Before installing Ruby, install some additional packages, else you might find that some stuff don’t work after the installation. One example is irb
For simplicity sake, do this:
bash> for i in readline iconv ncurses ; do rvm pkg install $i; done
rvm install 1.9.3-head –with-gcc=clang –with-readline –with-iconv –with-ncurses
The “–with-gcc=clang” is a recommendation in rvm requirements. It’s for those who has a fresh Lion install with Xcode 4.2.
That’s it. Ruby done. You can now continue with Rails etc.