The following instructions will guide you through the installation of Tracks from source.
This description is intended for people installing Tracks from scratch. If you would like to upgrade an existing installation, please see the upgrade documentation.
Various Tracks users have contributed installation howtos for specific environments. They are on the wiki.
If you are not confident installing Tracks from source using these instructions, there are several alternative options provided by third parties:
- If you’d like to install Tracks on a local machine, try the packaged version offered by Bitnami — it runs on Windows, Mac OS X and Linux.
- If you’d like to run Tracks within a dedicated virtual machine, JumpBox provides preconfigured virtual machine images.
- Several providers offer individual Tracks user accounts. A list of these providers can be found on the wiki.
(Please note that these third-party options may use older versions of Tracks.)
Tracks has a few software requirements that must be satisfied before installation:
- Ruby. Tracks requires Ruby 1.9.3 or greater.
- Bundler. Tracks requires a recent version of Bundler to handle the installation of dependencies. Bundler is typically installed by running
gem install bundler.
- Database. Tracks is tested on MySQL, but SQLite and PostgreSQL can also be used. Of the three, SQLite requires the least configuration. Whatever your choice, the appropriate database software must be installed.
There are two methods of downloading Tracks:
- (Recommended for most people) Download an archive of the latest stable release and extract it to your preferred location (e.g.
~/Sitesfor Mac OS X users).
- If you want to live on the edge, you can get the latest development version from GitHub using git (bear in mind that this may be less stable than the released versions):
cd ~/Sites git clone https://github.com/TracksApp/tracks.git cd tracks
Set up the database
This section only applies if you will be using Tracks with a MySQL database.
You need to create a database and database-user to use with Tracks. For this, you can use MySQL Administrator or go into a terminal and issue the following commands:
mysql -uroot -p mysql> CREATE DATABASE tracks; mysql> GRANT ALL PRIVILEGES ON tracks.* TO yourmysqluser@localhost \ IDENTIFIED BY 'password-goes-here' WITH GRANT OPTION;
Tracks is built upon a number of Ruby libraries (known as ‘gems’). The Bundler tool makes it easy to install all the gems that Tracks needs, and ensures that they are all the correct versions.
- Edit the file
Gemfilein the Tracks root directory. You may comment out any database drivers you will not be using. You may also comment out
- Run the command
bundle install --without development testin the directory that you unzipped your Tracks download to.
- Wait for Bundler to finish installing the necessary gems that Tracks needs. This can take some time depending on the speed of your internet connection and the speed of the system you’re installing Tracks on.
- In the
configfolder, copy the files
- Open the file
config/database.ymland edit the
production:section with the details of your database. If you are using MySQL the
adapter:line should read
host: localhost(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:
- Open the file
config/site.yml, and read through the settings to make sure that they suit your setup. In most cases, all you need to change are the
salt: "change-me"line (change the string “change-me” to some other string of your choice), the administrator email address (
admin_email), and the time zone setting. For the time zone setting you can use the command
bundle exec rake time:zones:localto see all available timezones on your machine
- If you are using Windows, you may need to check the ‘shebang’ lines (
#!/usr/bin/env ruby) of the
/public/dispatch.*files and all the files in the
/scriptdirectory. They are set to
#!/usr/bin/env rubyby default. This should work for all Unix based setups (Linux or Mac OS X), but Windows users will probably have to change it to something like
#c:/ruby/bin/rubyto point to the Ruby binary on your system.
- If you intend to deploy Tracks with the built in webserver called WEBrick, you’ll need to change
Populate your database with the Tracks schema
Open a terminal and change into the root of your Tracks directory. Enter the following command:
bundle exec rake db:migrate RAILS_ENV=production
This will set up your database with the required structure to hold Tracks’ data.
bundle exec rake assets:precompile RAILS_ENV=production
Start the server
While still in the Terminal inside the Tracks root directory, issue the following command:
bundle exec rails server -e production
If all goes well, you should see some text informing you that the WEBrick server is running:
=> Rails application starting in production on http://0.0.0.0:3000. If you are already running other services on port 3000, you need to select a different port when running the server, using the
Visit Tracks in a browser
http://0.0.0.0:3000/signup 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. If you need to access Tracks from a mobile/cellular phone browser, visit
http://yourdomain.com/mobile/. This mobile version is a special, lightweight version of Tracks, designed to use on a mobile browser.
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!