Setting up Tracks under Windows XP
NOTICE:: This tutorial is deprecated. This tutorial works only for Tracks version 1.0.3. It does NOT work properly for the most current version of Tracks. Additionally, if you receive an error regarding Ruby GEMS when attempting to start tracks, please reinstall Ruby, and Rails. Additionally, try installing rails without going through GEMS if possible (good luck finding the download to do so, though). I will update this tutorial for the newest version(s) of Tracks, as soon as possible.
Recently, I head about this great GTD application called Tracks. It’s built in Ruby, and runs on the Ruby on Rails framework. It’s also nice and ajaxified. It’s pretty spiff, and does precisely what you need a GTD application to do. Plus, it’ll work under IE and FireFox (and, I presume the other majors, as well).
If you’re a linux/OSX user, then getting Tracks running is pretty easy. If you’re a Windows XP user, you might need more help. Although John Leonard has written a pretty great tutorial on this very subject, already, I find it’s a bit overkill. His tutorial uses a much different method, including an unneccesary (in the grand scheme of things) web server package. This tutorial concentrates on getting Tracks running with only Ruby and MySQL. The following tutorial will lead you through the steps of setting up Tracks on your Windows XP machine.
CONVENTIONS USED:
I’m an old geek (well, old in the grand scheme of Windows XP). I’m used to calling things by slightly different names. Here we go:
- Directory
- This is what I call a ‘folder’. Directory = Folder.
- Prompt
- Also known as Command Prompt. What you get when you click Start, RUN, and type ‘command.com’
- shebang
- The symbol ‘#!’. Normally used on the first line of any script. If I say ‘change the shebang to read…’ I mean to change that line to read whatever.
WHAT YOU NEED:
- MySQL 5.0 Windows Installer
- Ruby 1.8.2-15 Windows Installer (plus popular extensions and editor) from rubyonrails.org
- Ruby on Rails (this is an automated install, no initial download required)
- Tracks 1.0.3 Zipped
- an unzip program (which you should have. If not, Windows XP ships with a not-so-wonderful one)
CREATING THE SPACE:
Your best bet is to create a base directory for the whole thing. I recommend “c:\gtd”. If you use something else (do not use ’c:\tracks’), simply make the change when neccesary. This just makes it easier to note where things are. Once you have this directory created, we’re ready to begin the installs. Now, make a subdirectory called ‘mysql’. (In other words, create: ‘c:\gtd\mysql’)
INSTALLING MySQL:
Extract the MySQL setup.exe, and run it. Follow the prompts, and install into the ‘c:\gtd\mysql’ directory. Choose ‘Custom’ installation, and install everything. Run the configuration setup (which should start, automatically), and choose ’standard’. Make certain you allow the system to create the MySQL service, and set it to start by default. Once the installation is complete, we’re ready to continue.
Now, open a prompt. At the prompt, type ‘mysql -uroot -p mysql’ and hit enter. When prompted, enter the password you set up during the MySQL installation, a moment ago.
Now, we need to set up a couple of users. I’ll use the generics ‘username’ and ‘password’ in the following examples. Whenever you see that, replace it with your preferred username and password. Be SURE to use the syntax exactly as I’ve written, even if you think it is misspelled. For this portion, be certain to use the same quote marks and apostrophes as I do, as well.
To set up the local user, type: GRANT ALL PRIVILEGES ON *.* TO ‘username’@'localhost’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
You should see MySQL spit out a “Query OK, 0 rows affected” and a timelength.
Now, setup the remote user. Use the same username and password as before. Type: GRANT ALL PRIVILEGES ON *.* TO ‘username’@'%’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
Again, MySQL will spit out a Query OK statement. Type ‘quit’. That’s it, let’s move on.
INSTALLING RUBY:
Run the ruby182-15.exe install file. Choose custom installation, and ensure everything is set to install. Then, change the install path to read ‘c:\gtd\ruby’ (Note: you must do this manually. There is a bug in the install software that prevents use of the “browse” button to choose the install path). Let the system install. When it’s done, we’ll move on.
INSTALLING RAILS:
Open a prompt and type ‘gem install rails –include-dependencies’. Let the installation finish. Once done, we’ll move on.
INSTALLING TRACKS:
This is the lengthy part… Make sure to follow each step. Also, remember, when you need to edit a file, do NOT use Word, or WordPad!!
Unzip the tracks-1.0.3.zip file. Copy the newly created folder to ‘c:\gtd’. You should now have a ‘c:\gtd\tracks-1.0.3′ directory. Let’s make things simpler to remember, and rename this directory to ‘c:\gtd\tracks’.
Now, go to ‘c:\gtd\tracks\config’ and rename the following files: (OLD NAME -> NEW NAME)
- database.yml.tmpl -> database.yml
- settings.yml.tmpl -> settings.yml
Now, open these files in a text editor (notepad is fine. It is VITALLY IMPORTANT that you do NOT use tabs in these files. Do NOT hit the TAB key while editing these files).
In the ‘database.yml’ file, change the username and password lines to reflect the user you set up in the MySQL install. For instance, if you set up a user of ‘eric’@'localhost’, then your “username:” line in database.yml would read: eric
Do this for all instances of username and password. Save the file.
In the ’settings.yml’ file, you can set your date option (if you understand Ruby’s date schema), but most likely you’ll only be setting the e-mail line. Save the file.
Now, go up one directory to ‘c:\gtd\tracks’ and rename the ‘c:\gtd\tracks\log.tmpl’ folder to ‘c:\gtd\tracks\log’.
(NOTE: This step may be optional, I’m not sure. Windows is fickle, sometimes, so what’s good for the goose may not be good for the gander.) Go to ‘g:\tracks\public’. You will need to edit ‘dispatch.cgi’ and ‘dispatch.fcgi’ in a text editor (like notepad). In each of these files, change the shebang line (or the first line) to read ‘#!g:\ruby\bin\ruby.exe’ Do this for both files, and save them.
In this portion, the ‘username’ and ‘password’ refers to the username and password you created in the MySQL portion. Now, you need to go back into MySQL: ‘mysql -uroot -p’ and hit enter. When prompted, enter the root password (that you created on installation).
At the MySQL prompt, type: CREATE DATABASE tracks
Then, if no error occurs (you’ll get a “Query OK” message if it was successful), type: GRANT ALL PRIVILEGES ON tracks.* TO ‘username’@'localhost’ IDENTIFIED BY ‘password’ WITH GRANT OPTION;
You should, again, get a “Query OK” message. If so, go ahead and type ‘quit’ to end the session.
Almost there, I promise. Now, we need to import the data.
In the command prompt, change directory to ‘c:\gtd\tracks\db’
For this section, the ‘username’ and ‘password’ token refer to the username and password you used, last step (creating the database). At the command prompt, you’ll need to import the data with the following commands: ‘mysql -uusername -ppassword tracks > tracks_1.0.3_mysql.sql’ and ‘mysql -uusername -ppassword tracks > tracks_1.0.3_content.sql’ (do not use any spaces between the option flags and the username or password. For instance, if your username was “phil” and you password was “ivy” then your line would read, ‘mysql -uphil -pivy tracks >’ and so on).
Are you ready, yet? Well, good, let’s move on to the next section.
STARTING TRACKS:
This is the easy part. Change directory to your ‘c:\gtd\tracks’ directory. Then, issue the following command: ‘ruby script/server –environment=production’
You should hear a little churning, and within a few seconds, see ‘=> Rails application started on http://0.0.0.0:3000′ and a bunch of other hullabuloo about WEBrick. This is the application webserver. You must leave this command prompt window open to keep Tracks running. When you’re ready to quit tracks (or you don’t need the server), you can hit CTRL-C to shut it down. Wait for a command prompt to re-appear, and then you can close the window.
Now, it’s time to log in to tracks for the first time. Load your favorite web browser, and browse to http://localhost:3000/signup. Then, enter your username, a password, and a secret word. Once you’re all signed up, you can log in for the first time, and start using Tracks.
Enjoy!
KNOWN ISSUES:
You have to keep a command prompt window open in order to keep Tracks running. This can get annoying, and I’ve yet to find a solution.
I’ve finally found a solution. Using Visual Basic Script, you can start ruby in a hidden window. Read this entry for all the details.
Help spread the love and Share This









