Skip to content

Instantly share code, notes, and snippets.

@sixfeetover
Created February 3, 2013 00:54
Show Gist options
  • Save sixfeetover/4700004 to your computer and use it in GitHub Desktop.
Save sixfeetover/4700004 to your computer and use it in GitHub Desktop.
Install older ruby with modern command line tools on OS X Lion/Mountain Lion
# Sources:
# http://robots.thoughtbot.com/post/27985816073/the-hitchhikers-guide-to-riding-a-mountain-lion
# https://github.com/sstephenson/ruby-build#special-environment-variables
# Install command line tools from https://developer.apple.com/downloads/index.action. Then:
sudo chown -R `whoami` /usr/local
brew update
brew upgrade rbenv
brew upgrade ruby-build
brew tap homebrew/dupes
brew install apple-gcc42
# Now you are ready to install older versions of ruby. If ruby-build doesn't detect your apple-gcc42 binary,
# use the command below
CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 rbenv install 1.8.7-p371
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment