Install the Prerequisites: MySQL, Ruby, Ruby on Rails
Install
unzip racing_on_rails-0.0.7.zip cd racing_on_rails-0.0.7
Set up database (this will destroy any existing racing_on_rails_development and racing_on_rails_test databases)
mysql -u root < db/create_databases.sql mysql -u root racing_on_rails_development < db/schema.sql
Start web server
ruby script/server
Database connection problems? Check the configuration in config/database.yml
Customize
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.
And then make a complicated change to Apache ... sorry, this is broken and not documented in release 0.0.6. Contact me directly for the details: scott@…
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 create an administrator user to add racers, add results, and edit the schedule.
mysql -u root racing_on_rails_development
insert into users (name, username, password) values ('Admin', 'admin', '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. You'll also want your code in a source control repository like Subversion or CVS, 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 -f local/config/deploy.rb
Working With the Latest Code
Check it out from the Subversion repository: svn co http://butlerpress.com/var/repos/racing_on_rails/trunk racing_on_rails
![(please configure the [header_logo] section in trac.ini)](/racing_on_rails/chrome/common/trac_banner.png)