How to setup OS X 10.8 for Ruby on Rails 3.2

Looks like almost every Rails developer is using OS X as development environment, so in this brief walkthrough I’ll explain you how to prepare your machine for Ruby on Rails development: nothing more, nothing less. I assume you are already running Mac OS X 10.8 Mountain Lion.

Install Command Line Tools for Xcode

Download it from developer.apple.com (you need an Apple ID).

As an alternative you can use osx-gcc-installer or install it via the Xcode GUI.

Install Homebrew

1
$ ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"

Install RVM (Ruby Version Manager)

You can:

  1. Download and install JewelryBox
  2. Or from the command line:
    1
    
    $ curl -L https://get.rvm.io | bash -s stable --ruby
    

Install and configure Git

You can:

  1. Get the latest version from the official website
  2. Or install it via Homebrew:
    1
    
    $ brew install git
    
1
2
$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"

Install Ruby via RVM

1
$ rvm install ruby-2.0.0

Install Rails via RubyGem

Notice: you may need to restart your terminal session before installing Rails.

1
$ gem install rails -v 3.2.13

And you’re ready to ride Ruby on Rails! Yee-ha!

Problems? Suggestions? Leave a comment.

Comments