I replaced a broken logic board on my MacBook Pro and have OS X Snow Leopard reinstalled without XCode.
I installed gems successfully without running into any errors, but when I tried installing rails it gives me an error:
Error: failed to build gem native extension.
I searched on the web and Stack Overflow guided me to upgrade to OS X Lion. I installed the Lion compatible Xcode 4.3, then installed the command line tools.
Now Rails installed just fine.
I thought Xcode is just an IDE. Why does it have anything to do with Rails?