Install the Prerequisites: MySQL 5+, Ruby 1.8.6, RubyGems?, MySQL gem, Rake gem, Rack 1.0.0. 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 mysql rake rack 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
Customize
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' ASSOCIATION.state = 'OR' SANCTIONING_ORGANIZATIONS = ["FIAC", "OBRA", "UCI", "USA Cycling"] unless defined?(SANCTIONING_ORGANIZATIONS)
Stop the web server (Control-C) and restart it to test.
Web page formatting
Create a local copy of the stylesheet: cp public/stylesheets/racing_on_rails.css local/public/stylesheets/racing_on_rails.css and modify it.
Web page contents (text, links, layout)
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
Production
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 Mongrel behind a load balancer, or Phusion Pasenger. You'll also want your code in a source control repository like Subversion or git, and automated deployment via Capistrano is a good idea, too.
Capistrano
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 and Mongrel Cluster gems.
![(please configure the [header_logo] section in trac.ini)](/racing_on_rails/chrome/common/trac_banner.png)