development environment


XCode / Mac developer tools

Download and install the latest Xcode developer tools (Mac-only is enough)

It's required for rvm (see below) and for some gems to compile correctly


Download this mysql version (mysql-5.1.45-osx10.6-x86_64.dmg) and install the DMG:

ruby 1.8.6

Set up ruby 1.8.6 through rvm.

rvm install 1.8.6 rvm 1.8.6 --default


    • rvm allows you to install multiple Rubies in parallel, isolate it from the globally installed Ruby, and easily switch between them and the gems compiled for them. It installs the Rubies in your home directory.

    • We still use ruby 1.8.6 on production although there is only 1 spec which does not pass on 1.8.7

mysql gem

First check if the mysql gem was installed correctly by geminstaller. If not, uninstall it and reinstall the gem with:

env ARCHFLAGS="-arch x86_64" gem install mysql --version "2.8.1" -- --with-mysql-config=/usr/local/mysql/bin/mysql_config


gem --version


Upgrade with:

(sudo) gem update --system

Configuration files

To create automatically config/database.yml payment.yml facebook.yml, run rake task

rake -f lib/tasks/dev_setup.rake setup:copy_config_files setup:create_log_folder


To get test data locally, run the following task. It creates a current production data dump, imports it to your local db and does some anonymization on it:

rake db:clone_production

Working with Parallel Specs

Please read How to work with tests as we are using parallel_specs which requires 2 test databases.

Set up textmate bundles

# cucumber mkdir -p ~/Library/Application\ Support/TextMate/Bundles/ cd ~/Library/Application\ Support/TextMate/Bundles git clone git:// Cucumber.tmbundle osascript -e 'tell app "TextMate" to reload bundles' # haml cd /Applications/ git clone git:// osascript -e 'tell app "TextMate" to reload bundles' # sass cd ~/"Library/Application Support/TextMate/Bundles/" svn co " Sass.tmbundle" svn co "" svn co osascript -e 'tell app "TextMate" to reload bundles' # rspec cd ~/Library/Application\ Support/Textmate/Bundles/ git clone Rspec.tmbundle osascript -e 'tell app "TextMate" to reload bundles' # current ruby on rails cd ~/Library/Application\ Support/Textmate/Bundles/ git clone git:// "Ruby On Rails.tmbundle" osascript -e 'tell app "TextMate" to reload bundles'

set up culerity

You will need the celerity gem installed into JRuby:

brew install jruby -S gem install celerity

Now install the Culerity gem:

gem install culerity