Setting up a new Mac for Rails Development

January 04, 2011

I just got a new MacBook (whoo hoo!) because my old machine dies (boo hoo) and thought I'd write down the steps I'm taking to set it up. I imagine this is more for myself than anyone else but keep reading if you like.

  • Some Apps
    1. Google Chrome for browsing
    2. TextMate for editing
    3. Adium for IM

  • Homebrew for package management
    1. Open a terminal and type
      ruby -e "$(curl -fsSL
    2. Download and Install XCode from Apple

  • git & github for development
    1. Install GIT
      brew install git
    2. create ssh keys and add to github following these instructions
    3. Configure git
      git config --global "Alex Rothenberg"
      git config --global ""
      git config --global color.ui true

  • RVM
    1. Install rvm
    2. add bundler to ~/.rvm/gemsets/global.gems and install it
      echo bundler >> ~/.rvm/gemsets/global.gems
      gem install bundler
    3. install Ruby 1.8.7 and make it default
      rvm install 1.8.7
      rvm --default 1.8.7

  • Databases
    1. MySQL
      brew install mysql
    2. Oracle (this is complicated but works if you follow the directions exactly TO THE LETTER without missing a single step!) Then I did have to run these extra commands
      1. Add oracle env settings to my user
        ## ORACLE
        export ORACLE_HOME=/Users/oracle/oracle/product/10.2.0/db_1
        export ORACLE_SID=orcl

      2. Enable me to access the oracle files
        sudo dscl localhost -append /Local/Default/Groups/oinstall GroupMembership alex
      3. SQL Developer is an Oracle GUI

  • Test with a project
    git clone git://
    cd legacy_data
    export MYSQL
    export ORACLE
    bundle install

  • Finally I'm following the trend and setting up a dotfiles project on github so I don't have to recreate them in the future.