Howto Tracks GTD on Ubuntu Hardy

As I (re)evaluate my GTD workflow, I’ve been testing a couple of applications that may help me increase my productivity while becoming a distraction or burden to manage. The next one on my list is Tracks. I decided to put forward a quick howto because it might not be that trivial for some users to git this running with Ruby on Rails.

So tracks going on your Ubunty Hardy you just need to install a few packages, most importantly ruby, ruby gems and sqlite 3 support. Then you just need to enable the sqlite3 gem for Ruby on Rails. Copy paste commands below:

sudo apt-get install rake rubygems libsqlite3-ruby
sudo gem install sqlite3-ruby

Then just follow the instructions on the tracks website. But, if your are lazy as me you can just copy paste the information below, which is a nice quick cheat sheet:

Get tracks, unzip into a folder. Go into that folder and edit the configuration file, making it look like the example shown here for sqlite3:

gedit config/database.yml
development:
adapter: sqlite3
database: db/tracks-dev.db

test:
adapter: sqlite3
database: ":memory:"

production:
adapter: sqlite3
database: db/tracks-main.db

Change a variable in config/environment.rb by putting whatever in it:

gedit config/environment.rb
SALT = "MakeThisYourRandomPhraseToGenerateSalt"

Build it:

rake db:migrate RAILS_ENV=production

Run it:

./script/server -e production

And that’s it, you should just be able to point your browser at http://localhost:3000 and give it a try. I personally don’t think that Tracks is my cup of tee, but it’s worth a shot.

One a side note, this is probably my last post before my summer break, so I’ll be back in a couple of weeks, I hope.

August 4, 2008

Web Development – Improved Ubuntu Workflow

Following my previous post on Web Development Workflow, I decided to be done with my procrastination and setup a local workflow, which keeps me location independent and autonomous.

The work flow is simple: Develop and test locally, deploy remotely. I’m currently applying this towards the development of an improved theme for my blog, which is basically this one, plus minor adjustments.

My setup is an Apache 2 webserver, with PHP and mySQL. On top of this I enable user dirs for the webserver, and deploy a local wordpress, which in fact runs a backup database from my production site.

First , install apache2,php and mysql support:

sudo apt-get install apache2 php5 libapache2-mod-php5 mysql-server

Now enable user directories support (things like localhost/~jonhdoe which actually live in /home/johndoe/public_html) and create the public_html folder:

sudo a2enmod userdir
mkdir $HOME/public_html

Another twist, since this is my main workstation and I don’t want an apache+mysql setup running all the time, is to remove all of the startup scripts from the default boot runlevels:

sudo update-rc.d -f mysql remove
sudo update-rc.d -f apache2 remove

I then run a script to start my environment when I want to code some web bits:

#!/bin/bash

/etc/init.d/apache2 start
/etc/init.d/mysql start

Don’t forget to make the script executable:

chmod +x bin/start-web-dev.sh

After all this I just installing web apps locally. In my case I just install Wordpress by uncompressing it into public_html, creating a DataBase using phpmyadmin, and running the install. After that I went to my production wordpress exported the DB, and imported it on the local wordpress. And I’m done.

As a finally twist I created a git repository of my theme, so i just modify+commit+push, and pull on the main website. Since I can push only when I need or can, this setup is really working for me.

Any further enhancements are welcome, so feel free to drop some suggestions to improve on this.

May 4, 2008