<p>Tracks 1.5 has been thoroughly beta tested by a large number of people, and should be fully stable for everyday use. However, once set up, Tracks will contain the majority of your plans for your work and personal life, so it’s only sensible to make sure that you have frequent, reliable backups of your data. Full changenotes on the release can be found in <code>doc/CHANGELOG</code>. Full API documentation can be found at <code>doc/app/index.html</code>, once you have run <code>rake appdoc</code></p>
<p>There are two methods of downloading Tracks 1.5:</p>
<ol>
<li>(Recommended for most people) Download the <ahref="http://www.rousette.org.uk/projects/files/tracks-current.zip">zipped package</a>, and unzip in your preferred location (e.g. <code>~/Sites</code> for Mac OS X users).</li>
<p>The Tracks interface is accessed through a web browser, so you need to run a webserver to serve the Tracks pages up to you. This isn’t as daunting as it sounds, however: Tracks ships with a built-in web server called Mongrel which you can run on your own computer to serve the Tracks application locally. If you want to be able to access Tracks from any computer connected to the Internet, then you need to install Tracks on a publicly accessible server, and you will probably be better off using a more robust server such as <ahref="http://www.apache.org/">Apache</a> or <ahref="http://www.lighttpd.net/">Lighttpd</a> to serve the pages, particularly if it will be used by many people.</p>
<p>Tracks stores its data in a database, and you can either use SQLite3, MySQL or PostgreSQL. SQLite3 is the best choice for a single user (or a small number of users) on a local installation, while MySQL or PostgreSQL is better for multiple users on a remote installation.</p>
<p>This is the easiest solution for Mac OS X 10.4 or Windows users wanting to run Tracks locally.</p>
<ol>
<li><strong>Mac OS X</strong>. <ahref="http://locomotive.sourceforge.net/">Locomotive</a> is an all-in one installer for Mac OS X 10.4, which includes everything you need to run Tracks with a SQLite3 database. Locomotive isn’t currently Leopard compatible, and doesn’t work with Panther.</li>
<li><strong>Windows</strong>. <ahref="http://instantrails.rubyforge.org/wiki/wiki.pl">Instant Rails</a> includes everything you need, including MySQL.</li>
<p>If you don’t want to (or can’t) use one of the all in one installations, you’ll need to install a few things, depending on your platform and your needs.</p>
<ol>
<li><strong>Ruby</strong>. Version 1.8.6 is recommended, but it is also possible to use 1.8.5, 1.8.4 and 1.8.2. Note that 1.8.3 is not compatible. If you are running Mac OS X Leopard, you already have Ruby 1.8.6 installed by default, so you have nothing to do here. You can get the source to compile yourself <ahref="http://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.gz">here</a> for all platforms, or Windows users can use an easy <ahref="http://rubyforge.org/frs/?group_id=167">installer</a>. If you’re using a version of Mac OS X earlier than 10.5.0, it is recommended that you use the <ahref="http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx">instructions here</a> to install all the Rails dependencies, though you can skip the step to install Rails if you like.</li>
<li><strong>RubyGems</strong>. The gems needed by Rails to interact with the database have to be compiled on the platform on which they will be run, so we cannot include them with the Tracks package, unlike some other gems. So you will need to <ahref="http://rubyforge.org/frs/?group_id=126">download</a> and install RubyGems (run <code>ruby setup.rb</code> after extracting the package). Note that once again, Mac OS X Leopard users get an easy life, because RubyGems and the SQLite3 gem is already installed. Once installed you can use RubyGems to install the gems you need for your database. If you are using SQLite3, run <code>sudo gem install sqlite3-ruby</code>, then select the appropriate package for your platform (version 1.2.1 recommended). You can use MySQL without installing a gem, but installing the gem can speed things up a bit: <code>sudo install gem mysql</code>. If you’re using Leopard, there are a few work-arounds necessary, which are explained on <ahref="http://trac.macosforge.org/projects/ruby/wiki/Troubleshooting#IcannotbuildrubymysqlonLeopardwithmysql.combinaries">Mac OS Forge</a>. The ruby-mysql bindings can sometimes be a bit troublesome to install, so to be honest, it’s probably not worth the bother unless you are trying to wring maximum speed out of your system. If you are using PostgreSQL, then you can install a postgres gem: <code>gem install postgres</code>.</li>
<li><strong>Database</strong>. The easiest option is to use SQLite3, as the database is included in the package. All you need then is the <code>sqlite3-ruby</code> gem, as described in step 2, and the SQLite3 libraries and binary (see <ahref="http://sqlite.org/download.html">sqlite.org</a> for downloads and installation instructions). If you want to use MySQL, download and install a package for your platform from <ahref="http://dev.mysql.com/downloads/mysql/5.0.html">MySQL.com</a>. The basic steps for Postgresql should be similar to those for MySQL, but they will not be discussed further here.</li>
<p>This description is intended for people installing Tracks from scratch. If you would like to upgrade an existing installation, please see <ahref="#upgrading"title="Upgrading to Tracks 1.5">Upgrading to Tracks 1.5</a>.</p>
<p>Unzip the package and move Tracks into the directory you want to run it from. For example, for Mac OS X users, <code>~/Sites</code> is a good choice.</p>
<p>Before you go any further, you need to decide which database you will use. See the <ahref="#whatyouneed"title="What you need to install">What you need to install</a> section for details on installing the required components for you choice of database.</p>
<li><strong>SQLite3</strong>. All you need to do is make sure that you point Tracks to the included SQLite3 database in <code>/db</code> in the next step, <ahref="#config_install"title="Configure variables">Configure variables</a>.</li>
<li><strong>MySQL</strong>. Once you have MySQL installed, you need to create a database to use with Tracks 1.5. Go into a terminal and issue the following commands:</li>
</ol>
<pre>
<code>
mysql -uroot -p
mysql> CREATE DATABASE tracks15;
mysql> GRANT ALL PRIVILEGES ON tracks15.* TO yourmysqluser@localhost \
IDENTIFIED BY 'password-goes-here' WITH GRANT OPTION;
<li>If you downloaded Tracks 1.5 via Subversion, you need to duplicate the files <code>database.yml.tmpl</code> and <code>environment.yml.tmpl</code> and remove the <code>*.tmpl</code> extension from the duplicates. Similarly, duplicate <code>/log.tmpl</code> and remove the <code>*.tmpl</code> extension, then edit the files as described in steps 2 and 3.</li>
<li>Open the file <code>/config/database.yml</code> and edit the <code>production:</code> section with the details of your database. If you are using MySQL the <code>adapter:</code> line should read <code>adapter: mysql</code>, <code>host: localhost</code> (in the majority of cases), and your username and password should match those you assigned when you created the database. If you are using SQLite3, you should have only two lines under the production section: <code>adapter: sqlite3</code> and <code>database: db/tracks-15.db</code>.</li>
<li>Open the file <code>/config/environment.rb</code>, and read through the settings to make sure that they suit your setup. In most cases, all you need to change is the <code>SALT = "change-me"</code> line (change the string “change-me” to some other string of your choice), and the time zone setting.</li>
<li>If you are using Windows, you may need to check the ‘shebang’ lines (<code>#!/usr/bin/env ruby</code>) of the <code>/public/dispatch.*</code> files and all the files in the <code>/script</code> directory. They are set to <code>#!/usr/bin/env ruby</code> by default. This should work for all *nix based setups (Linux or Mac OS X), but Windows users will probably have to change it to something like <code>#c:/ruby/bin/ruby</code> to point to the Ruby binary on your system.</li>
<p>This will update your database with the required schema for Tracks 1.5. If you are using SQLite3, it is not strictly necessary, because the SQLite3 database included with Tracks already has the schema included in it, but it should not do any harm to run the command (nothing will happen if it is up to date).</p>
<p>While still in the Terminal inside the Tracks 1.5 root directory, issue the following command:</p>
<p><code>script/server -e production</code></p>
<p>If all goes well, you should see some text informing you that the Mongrel server is running: <code>** Mongrel available at 0.0.0.0:3000</code>. If you are already running other services on port 3000, you need to select a different port when running the server, using the <code>-p</code> option. You can stop the server again by the key combination Ctrl-C.</p>
<p>Visit <code>http://0.0.0.0:3000/signup</code> in a browser (or whatever URL and port was reported when you started the server in the step above) and chose a user name and password for admin user. Once logged in as admin, you can add other (ordinary level) users.</p>
<p>Once logged in, add some Contexts and Projects, and then go ahead and add your actions. You might also want to visit the Preferences page to edit various settings to your liking. Have fun!</p>
<p><strong>TODO: Instructions for upgrading from a version earlier than 1.043</strong></p>
<h3id="upgradingfromtracks1.043">Upgrading from Tracks 1.043</h3>
<p>This should be a relatively straightforward, and involves the following main steps:</p>
<ol>
<li><ahref="#backup_upgrade"title="Backing up">Back up</a> your existing database and installation of Tracks</li>
<li><ahref="#install_upgrade"title="Install Tracks 1.5">Install Tracks 1.5</a> in a new directory</li>
<li><ahref="#config_upgrade"title="Copy over old configuration files">Copy over</a> a few configuration files from your Tracks 1.043 directory. If using SQLite3, copy the old database into the new Tracks 1.5 directory</li>
<li>Run <code>rake db:migrate RAILS_ENV=production</code> to <ahref="#rake_upgrade"title="Update your old database to the new format">update your old database</a> to the new schema – you did back up your database didn’t you?</li>
<li>Run <code>script/server</code> inside your Tracks 1.5 directory to <ahref="#startserver_upgrade"title="Start the server">start up Tracks 1.5</a>.</li>
<li>Once you are happy that everything is working well, <ahref="#cleanup_upgrade"title="Clean up your old installation">delete your old Tracks directory</a>.</li>
</ol>
<h4id="backup_upgrade">Backing up</h4>
<p>It’s very important that you <strong>back up your database</strong> before you start the upgrade process. It’s always possible for things to go wrong with the database update, and you don’t want to lose any data. If you are using SQLite3 and you are leaving your old Tracks directory in place, then you don’t need to do anything. However, there is no harm in taking extra precautions and copying your database from <code>/db</code> to a safe location as an extra backup, or making a dump of the schema and contents. You will never regret making too many backups! If you are using MySQL, make a SQL dump of your database, replacing the terms in square brackets with the correct information for your setup:</p>
<p>Rename your old Tracks installation (e.g. to ‘tracks-old’) so that you can install Tracks 1.5 along side it.</p>
<h4id="install_upgrade">Install Tracks 1.5</h4>
<p>There are two methods of downloading Tracks 1.5:</p>
<ol>
<li>(Recommended for most people) Download the <ahref="http://www.rousette.org.uk/projects/files/tracks-current.zip">zipped package</a>, and unzip in your preferred location (e.g. <code>~/Sites</code> for Mac OS X users).</li>
<h4id="config_upgrade">Copy over old configuration files</h4>
<p>There are a few files you need to copy over from your old installation. If you copy them over rather than moving them, you can still run your old version of Tracks if anything goes awry with the installation process.</p>
<ol>
<li>Copy <code>/config/database.yml</code> from your old Tracks directory to the same location in the new one. Double check that the information there is still correct.</li>
<li>Duplicate <code>/config/environment.rb.tmpl</code> in the Tracks 1.5 directory, and rename the file to <code>environment.rb</code>. Open the file and alter the line <code>SALT = "change-me"</code> so that it matches what you had in this file in your old installation. You may also want to change the time zone setting as appropriate for your location (<code>ENV['TZ'] = 'US/Eastern'</code>). If you have made any other customisations to <code>environment.rb</code> in the past, copy those over, but the contents of the file have changed quite a lot since 1.043, so check it carefully.</li>
<li>Copy your <code>/log</code> directory over from your old installation to the root of the new one, or just rename <code>/log.tmpl</code> to <code>log</code> to start afresh.</li>
<li>If you are using SQLite3, copy your database from <code>/db</code> in your old Tracks directory to the same location in the new one.</li>
<li>If you are using Windows, you may need to check the ‘shebang’ lines (<code>#!/usr/bin/env ruby</code>)<ahref="#fn:env"id="fnref:env"class="footnote">1</a> of the <code>/public/dispatch.*</code> files and all the files in the <code>/script</code> directory. They are set to <code>#!/usr/bin/env ruby</code> by default. Check the format of those lines in your old installation, and change the new ones as necessary.</li>
</ol>
<h4id="rake_upgrade">Update your old database to the new format</h4>
<p>In a terminal, change directories so that you are inside the Tracks 1.5 directory. Then issue the command:</p>
<p>Watch the output carefully for errors, but it should report at the end of the process that everything worked OK. If you do get errors, you’ll have to fix them before you proceed any further. Running rake with the <code>--trace</code> option can help to track down the problem.</p>
<h4id="startserver_upgrade">Start the server</h4>
<p>If you’re still in the Tracks 1.5 root directory in a terminal, enter the following command to start up Tracks in production mode:</p>
<p><code>script/server -e production</code></p>
<p>Visit the URL indicated by the output (e.g. <code>** Mongrel available at 0.0.0.0:3000</code>
) in a browser, and with any luck, you should be able to log in and find all your actions as you left them!</p>
<h4id="cleanup_upgrade">Clean up your old installation</h4>
<p>Once you’re certain that your new Tracks 1.5 installation is working perfectly, you can delete your old Tracks directory.</p>
<divclass="footnotes">
<hr/>
<ol>
<liid="fn:env"><p>The <code>env</code> binary helps to locate other binaries, regardless of their location. If you don’t have <code>env</code> installed, you’ll need to change this line to point to the location of your Ruby binary.<ahref="#fnref:env"class="reversefootnote"> ↩</a></p></li>