Skip to content

Instantly share code, notes, and snippets.

@mrrooijen
Created October 16, 2012 22:19
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrrooijen/3902418 to your computer and use it in GitHub Desktop.
Save mrrooijen/3902418 to your computer and use it in GitHub Desktop.
Ruby Environment On Mountain Lion

Ruby Environment On Mountain Lion

A quick and easy step-by-step guide to get your Ruby environment up and running again after a fresh install of Mountain Lion. I messed up my installations a few times and figured I'd just put out a Gist once and for all to get this sucker working in one go.

The Steps

First go ahead and install either XCode to get ahold of the Command Line Tools. Or, if you prefer not to install XCode, simply download the latest version directly. This only requires you to provide your Apple ID and password to sign in. You do not need a developers license.

  1. Download the Command Line Tools
  • Or install them through XCode via the preference panel
  1. Install RVM
  2. Install Homebrew

Should you mess up the installation order or come across permission or other errors, try the following:

  1. sudo chown -R $(whoami) /usr/local
  2. brew update

Just run these commands if you're unsure.

Next, install the apple-gcc42 through Homebrew in order to be able to install Ruby versions older than 1.9.3:

  1. brew tap homebrew/dupes
  2. brew install apple-gcc42

Ruby 1.8.7 and Ruby Enterprise Edition

Ruby 1.8.7 will not compile with the default options. In order to properly compile Ruby 1.8.7 or Ruby Enterprise Edition (REE) with RVM, issue the following commands:

  1. rvm install 1.8.7 --without-tcl --without-tk
  2. rvm install ree --without-tcl --without-tk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment