OS X Lion and RVM

January 17, 2012 - 12:00 pm

As part of my duties, I'm being prodded to use OS X for development. It's not been without headaches, at least where RVM is concerned - attempts at installing Vagrant under Ruby 1.8.7 resulted in segmentation faults. Ruby 1.9.2 ain't without issue, neither.

Thankfully, the Internets are here to help. A knowledgeable fellow going by Jalada knows his business. He knows what o'clock it is, I dare say.

The short of it is, Lion comes with some gimcrack modern rubbish known as LLVM, whereas you need the right honorable Admiral Lord GCC. If your MBP or MBA was made after the dinosaurs went extinct, you probably don't have pure, undiluted GCC. As per the previous link's comments, simply go here, snag the OS X 10.6 Snow Leopard: GCC-10.6.pkg package, install it, and Bob's yer uncle Dick.

That is to say, you'll have proper GCC slumming about at /usr/bin/gcc-4.2.

After that, simply append CC=/usr/bin/gcc-4.2 before your RVM installations. (EG, CC=/usr/bin/gcc-4.2 rvm install 1.8.7)