Installing Ruby on Rails on OSx

I got myself a Macbook Air today to primarily be a development machine. For those of you who are looking for a shortcut, check out RailsInstaller that does a quick job as well. Personally, I just wanted to give a shot of installing Rails from scratch because it’s a good way of really understanding your system and the appropriate pre-requisites to run Rails. Also, it allows you to specify what version of Rails and ruby you want installed on your system.

I assume that you already have Homebrew installed on your system.

  1. Install RVM
    run curl -L https://get.rvm.io | bash
  2. Re-load your environment
    source ~/.rvm/scripts/rvm
  3. Setup additional pre-requisites
    brew install libyaml
    brew install openssl
  4. Install ruby 2.0.0 and set it as the default version
    rvm install 2.0.0 \ –with-openssl-dir=$HOME/.rvm/usr
    rvm –default use ruby-2.0.0-p247
  5. Install Rails and Bundler
    gem install rails –version=3.2.14
    gem install bundler
  6. Install SQLite which is good quick database for development purposes
    brew install sqlite3