qodvxg
Last Updated: February 25, 2016
·
6.863K
· jimeh
C48498c82bfaf0c6c8843ba85e3cd598

Install pre-1.9.3 Ruby on Mountain Lion

Based on a few sources I have figured out how to install pre-1.9.3 Ruby on Mountain Lion. This is a quick summary of requirements and actions.

Pre-requisites

Install GCC

No, the Xcode Command Line Tools do not include GCC, they include LLVM-GCC. Same-same, but different.

$ brew tap homebrew/dupes
$ brew install apple-gcc42

Add the following to your ~/.profile or equivalent:

export CC=/usr/local/bin/gcc-4.2

And reload your shell before attempting the install commands below.

Install Ruby

Prefix the install command with CFLAGS="-I/opt/X11/include".

For rbenv, the full command would be:

CFLAGS="-I/opt/X11/include" rbenv install ree-1.8.7-2012.02

And for RVM:

CFLAGS="-I/opt/X11/include" rvm reinstall ree
Say Thanks
Respond