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.
$ ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"
Install RVM (Ruby Version Manager)
- Download and install JewelryBox
- Or from the command line: ``` bash $ curl -L https://get.rvm.io | bash -s stable --ruby ```
Install and configure Git
- Get the latest version from the official website
- Or install it via Homebrew: ``` bash $ brew install git ```
$ git config --global user.name "Your Name" $ git config --global user.email "firstname.lastname@example.org"
Install Ruby via RVM
$ rvm install ruby-2.0.0
Install Rails via RubyGem
Notice: you may need to restart your terminal session before installing Rails.
$ gem install rails -v 3.2.13
And you’re ready to ride Ruby on Rails! Yee-ha!
Problems? Suggestions? Leave a comment.