Oh shit, it’s a lion, get in the headache.

OS X and RVM

January 17th, 2012

As part of my ever-underpaid duties, I’m being forced to actually 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 bloke 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′)

…This sort of nonsense, though, is why I despise the idea of local development; indeed, I avoid it whenever possible. But as the current fancy du jour involves building standardized virtualized machines for developers (thus avoiding this sort of issue, and more importantly, ‘hurr, works on my machine!!!!1111eleven’ syndrome), well, my hand is forced. Yo dawg, I herd u like virtualization, but we can’t put a virtual box in your virtual box. Really.