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
- Xcode Command Line Tools
- Homebrew
- XQuartz 2.7.2 or later.
- rbenv/ruby-build or RVM.
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
Written by Jim Myhrberg
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#