Quick Start

Install the prerequisites: MySQL 5+, Ruby 1.9.3 with RubyGems, Bundler gem, MySQL database. Get the latest code from GitHub. Set up database and start the web server (this will ‘'’destroy’’’ any existing racing_on_rails_development and racing_on_rails_test databases). Test http://localhost:3000.

gem install bundler
git clone git://github.com/scottwillson/racing_on_rails.git
cd racing_on_rails
rake racing_on_rails:bootstrap

Database connection problems? Check the configuration in config/database.yml


For more detail, see customization

Bike racing association name

Not interested in the Cascadia Bike Racing Association? Create your own local configuration file: local/config/environment.rb. Add your association:

ASSOCIATION = RacingAssociation.new
ASSOCIATION.name = 'Oregon Bicycle Racing Association'
ASSOCIATION.short_name = 'OBRA'


Stop the web server (Control-C) and restart it to test.

You can also make changes to your racing association at http://localhost:3000/admin. Click on “Site.”

Web page formatting

Create a local copy of the stylesheetand modify it:

cp public/stylesheets/racing_on_rails.css local/public/stylesheets/racing_on_rails.css

Copy individual RHTML files from app/views to local/app/views. Rails applies the master layout template app/views/application.rhtml to all page.

Admin Access

You need to be an administrator user to add racers, add results, and edit the schedule.

  email: admin@example.com
  password: secret



This quick start will get you going in development. It runs Ruby’s built-in, single-threaded web server: Webrick. You need a better solution for a production web site and, for better or worse, there are many options. You best bet is Heroku or a virtual hosting service (like Linode), application server (Unicorn), and deployment tool (Capistrano).

Most Racing on Rails sites are hosted on the OBRA and WSBA servers. Email me at scott@rocketsurgeryllc.com if you would like to be hosted there as well.


Normally, Capistrano’s deployment recipe file is stored in config/deploy.rb and run by ‘cap deploy,’ but this doesn’t make sense for Racing on Rails. Every site’s deployment is a little different than the other’s. Place your custom deployment file in local/config/deploy.rb and use Capistrano directly from the command line:

cap deploy

You’ll need the Capistrano gem.