Running the Purpose Platform Locally on Mac OS X - PurposeOpen/Platform GitHub Wiki

Ruby

Mac OS X comes with ruby installed, however the ruby version is often out of date. Instead of updating the ruby that shipped with OS X, it's better to install the version we need for Purpose Platform in a different location.

RVM is a great way to manage ruby versions and your gems. After installing RVM, install the ruby version specified at the top of Gemfile in PurposeOpen/Platform root directory. The ruby specification in Gemfile will look like:
ruby '1.9.3'

If you plan on hosting on Heroku or another service with standard stacks, specify the patch level of the ruby version that your chosen stack uses. The RVM command looks like:
rvm install ruby-1.9.3-p392

Gems

Move into your local Purpose Platform repository in a terminal window. You should get a notice from RVM asking if you trust the .rvmrc file; reply 'yes'. Check that you have the 'purpose' gemset:
rvm gemset list

If the 'purpose' gemset is not listed, create it:
rvm gemset create purpose

Make sure you are running on the correct ruby version and the 'purpose' gemset:
rvm info

Install the gems:
gem install bundler && bundle

Database

Currently the Purpose Platform runs on MySQL. If you need to install MySQL, homebrew is a great way to do it.

Create the development and testing environment tables:
rake db:create

Run migrations and prepare the test table:
rake db:migrate db:test:prepare

Run the tests:
rake

All tests should pass successfully. If they don't, try debugging your dev environment, then let us know. The cucumber and jasmine tests run on your local version of Firefox. The cucumber and jasmine tests should pass with Firefox 19.0.2.

Seed Data

Load sample content with the following rake task:
rake db:seed

Up and Running

Start the server (specifying a port preference):
rails s puma -p 5000

Navigate to the Purpose Platform in your browser: http://localhost:5000.

If you want to cut lists and search, run the server and the rest of the tools:
foreman start -f Procfile.dev