Saturday, September 24, 2005

Installing Tracks on Debian

Yesterday I mentioned that I was considering trying out some new task-management software, and in particular was thinking about But She's a Girl's Getting Things Done system, Tracks. Today I decided to see if I could install it on my Debian Linux system.

One thing I love about Debian is the apt-get package management system; today made me realize just how much I admire it. There is no Debian package for Tracks, and no package for RubyGems, one of the programs essential for running Tracks. This meant that the installation took quite a bit of fiddling (even with the Debian Tracks walkthrough).

Tracks needs a number of different components to work properly:
  • Ruby - available as a package in Debian
  • RubyGems - a package management system for Ruby (not available as a Debian package)
  • Rails - installed via RubyGems (not via the Debian Rails package, at least according to here)
  • A web server (e.g. Apache 1.3) - available as a package in Debian
  • A database (e.g. MySql 4.1) - available as a package in Debian
  • The Tracks program - available here (not available as a Debian package)
I'm currently running Debian Testing (etch), and prior to today had already installed and configured Apache 1.33 (see for some Apache configuration advice). Here's the steps I went through to get Tracks working (cleaned up to remove wasted effort):

1) Downloaded Tracks and uncompressed it to a directory in my home directory ("unzip").

2) Installed MySql 4.1 via the mysql-server-4.1 package ("apt-get install mysql-server-4.1"). To configure MySql I first added root passwords
shell> mysql -u root
mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpwd');
mysql> SET PASSWORD FOR 'root'@'%' = PASSWORD('newpwd');
and then created a new user and a database for Tracks to use (the user was created for security reasons; see here for a full post on the topic).
mysql> grant CREATE,INSERT,DELETE,UPDATE,SELECT on tracks.* to tracksuser@localhost identified by 'password';
After the user and database were created, I populated the database with pre-existing data provided by the Tracks install (running the following commands from the tracks/db folder):
mysql -u tracksuser -p tracks < tracks_1.0.3_mysql.sql
mysql -u tracksuser -p tracks < tracks_1.0.3_content.sql
[note: I first tried to install the mysql-server package (which installs MySql 4.0), but ran into bug 321578, and after that kept getting a "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)" error that prevented the server from starting, which I couldn't work around. Installing MySql 4.1 overcame this problem. The MySql reference manual was very helpful for all of the MySql configuration.]

3) I installed the Ruby package ("apt-get install ruby"), and then downloaded RubyGems 0.8.11 from here. After uncompressing the file ("tar -xvvfz rubygems-0.8.11.tgz") I installed it using the command "ruby setup.rb" from inside the RubyGems directory.

4) Once RubyGems was installed, I used that to install bluecloth, rails, and Ruby's mysql ("gems install bluecloth", "gems install rails --include-dependencies", and "gems install mysql"). The rails and mysql installs failed initially, but I found this post which provided a good walkthrough for the installation of rails. In short, I had to install many Debian packages, including libopenssl-ruby, liberb-ruby, libdbd-mysql-ruby, libmysqlclient14-dev, libzlib-ruby, rdoc, irb, ri1.8, and ruby1.8-dev. I also installed the Debian package for rails, but then uninstalled it ("apt-get remove rails"). After all these other packages were installed I was finally able to install bluecloth, rails, and Ruby's mysql. I also updated RubyGems by running the command "gem update --system".

5) I then configured Apache by adding the following to my httpd.conf file:
<VirtualHost *:80>
ServerName rails
DocumentRoot /path/tracks-1.03/public/
ErrorLog /path/tracks-1.03/log/server.log

<Directory /path/tracks-1.03/public/>
Options ExecCGI FollowSymLinks
AllowOverride all
Allow from all
Order allow,deny

6) To start Tracks I ran "ruby script/server --environment=production" from the tracks directory (no need to be root for this). This puts a lot of output directly into the terminal window (good for debugging, bad for everyday use) and doesn't background the process. So far my solution to this is to run it in the background while outputting to a log file ("ruby script/server --environment=production &> tracksdirectorypath/log/output.log &"). I'm still trying to find a way to start the program automatically whenever the computer starts; I should probably write an init.d script (as mentioned here).

7) I then went to, created my login, and was able to use the program. Unfortunately, I spent a while thinking I had something misconfigured because I was trying to create my root login account via the page, which kept reporting a "Login unsuccessful" message. The manual nicely corrected me (once I bothered to re-read that portion of it).

Considering that I probably spent more than four hours trying to get the install working, I haven't had much time to play with the program. One very nice feature is that I can access my Tracks install from over the network, meaning that I'll be able to host it on my Debian box here at home but still use it from my Windows box at work (or any computer that I'm on).

I'm already impressed with the elegance and clean design of the program; it's very easy to use, and I think it might really help me keep track of things.

[Final note: Keep in mind that I'm a novice at Debian, so take all this advice with a grain of salt.]

1 comment:

Radagast said...

Importing comments:

thanks for that tutorial, Radagast, haven't followed it yet but I am lucky to see that there's something new besides Thomas' instructions in the wiki.

I am using Tracks for a while now - but on Windows 2k (which also requires a lot of manual fine tuning).

This tut should be helpful to get tracks work on my fresh Ubuntu Breezy install - I already noticed that there might be some additional work with rails and rubygems.

@"trac deb": there seems to be a misunderstanding - just similar names for totally different things:

a) "Trac": "... is a web-based software project management and bug/issue tracking system emphasizing ease of use and low ceremony. It provides an interface to the Subversion revision control systems, integrated Wiki and convenient report facilities."

b) "Tracks": "... is a web application that is specifically designed to implement the Getting Things Done (GTD) methods. That doesn't mean that you can't use it for other kinds of todo tracking. Data is stored in a database (either MySQL, Postgresql or SQLite), and viewed in a web browser via a web server (Apache, Lighttpd or WEBrick among others). This makes it cross-platform as well as being accessible from anywhere that you have web access." -
January 9, 2006, 11:59:21 PM PST – Like – Reply

It does? Where? The only pages I can find on Trac related to Debian are the Debian Tracks installation page and the Debian Trac installation page; neither of which have a .deb on them.
October 1, 2005, 6:36:05 AM PDT – Like – Reply

The trac site has a .deb available...
September 29, 2005, 7:23:27 AM PD