Configuration

Tracks has two configuration files in the source:trunk/tracks/config directory:

  • database.yml.tmpl
  • settings.yml.tmpl

You need to copy both of these files and remove the .tmpl extension before you start:

cd tracks/config
cp database.yml.tmpl database.yml
cp settings.yml.tmpl settings.yml

Note that both *.yml files are fussy about format. You need to use Unix line endings and make sure that you only edit them with a proper text editor (not a word processor). Also, you need two spaces to indent the items, and the last line must only contain a new line: no spaces, tabs or anything else.

database.yml

This holds your database configuration settings for each of the running environments. Unless you want to test Tracks, you don't need to fill in the entry under 'test'. If you like, you can point both the production and development sections to the same database (I'd advise only running under development if you are tinkering with the code on your own machine). The entries should be fairly self-explanatory:

production:
  adapter: mysql
  database: tracks
  host: localhost
  username: username
  password: password

The adapter needs to be either mysql, postgresql or sqlite (see instructions here) depending on which database you are using. database is the name of your database, and you need to put the username and password that you use to connect to that database in username and password. In most cases, host: localhost will be correct if your database is located on the same machine that's running Tracks.

settings.yml

This file holds custom settings.

formats:
  date: %d/%m/%Y
admin:
  email: butshesagirl@rousette.org.uk

The date format is your preferred display format for due dates. It uses standard strftime format strings. In this example, 1st December 2005 would be formatted as 01/12/2005. The email field is needed for the login/signup page, to inform unprivileged users that they need to contact you to request a username and password.