DevelopmentEnvironment

This page describes the steps to perform to start developing and contributing to Railtrackr on your local machine.

The following instructions have been created and tested using Mac Os X as development environment, but they should work properly with minor modifications even on different platforms.

Environment Setup

First, make sure you have ruby, rails and rubygems correctly installed in your system. I recommend following these guides:

you don’t need to have MySQL installed as well ( Railtrackr does not use the database layer ), but you can install it as well … you never know, and 99% of other Rails project use the database.

The next step is to update your rubygems to the latest version. Fire up a terminal and type:

sudo gem update --system

And verify it by typing gem -v and verifying that the output is something like 1.0.1 .

Then verify that your installed gems contains rails 2.x and all its dependencies:

$ gem list

*** LOCAL GEMS ***

actionmailer (2.0.2, 1.3.3)
actionpack (2.0.2, 1.13.3)
actionwebservice (1.2.6, 1.2.3)
activerecord (2.0.2, 1.15.3)
activeresource (2.0.2)
activesupport (2.0.2, 1.4.2)
rails (2.0.2, 1.2.3)
sqlite3-ruby (1.2.1)
... other gems ...

Note that in the previous listing I have two versions of rails installed ( 1.2.3 and 2.0.2 ). Railtrackr is built upon Rails 2.x .

If you are upgrading from a 1.2.x version of Rails, in addition to updating rails gem with sudo gem update, remember to install the new activeresource gem with :

sudo gem install activeresource

SVN Checkout

Make sure you have subversion installed on your system. If not, read the subversion paragraph in this guide . Then issue this command from the terminal:

svn co http://svn2.assembla.com/svn/railtrackr

You’ll now have a railtrackr directory containing the program sources.

Get a Flickr API key

Railtrackr loads photos from Flickr , so you need an API key, that allows your code to query the Flickr services programmatically. Go to the Flickr Services website and register for a developer API key.

Starting it up

You should be now ready to go. Enter into the directory you just downloaded from svn, a start the application:

cd railtrackr
script/server

By opening your browser at http://localhost:3000/ you should access a welcome screen where you can enter the Flickr API key and other optional setup informations. Once you have entered this informations, you’ll be able to use the application.

Configuration files

Railtrackr store configuration informations in yml files stored under the config/ folder.

railtrackr_development.yml
railtrackr_test.yml
railtrackr_production.yml


Copyright © 2006–2008 by Assembla, LLC / Phone 1.781.328.2241 / E-mail: info@assembla.com