A couple of weeks ago I deployed my first Rails app; The Claptrap site
.
Firstly, a bit about Claptrap: Claptrap is a radio show in Brisbane, Australia airing Sunday mornings on 4ZzZ 102.1FM. It's funny as hell and I recommend it to anyone who lives in Brisbane and/or has the internet (anyone reading this would have to fall into at least one of those categories).
As I said before, the Claptrap site was developed using Ruby on Rails and was a great project to give me something practical with which to learn the framework. There is still much to learn but Claptrap gave me a good start.
I was also trialling a new tool that was only pointed out to me recently: Unfuddle. Unfuddle is a project manager suite that let me keep track of every part of the project. The site tracks my tickets and milestones as well as giving me a central Git repository to keep my code in.
If you are in need of a laugh then check out Claptrap.com.au.
Are you using Git in Ubuntu and want to use an external visual diff viewer? It's easy! I will be using Meld for this example but most visual diff tools should be similar. If you don't already have Meld, then install it:
sudo apt-get install meld
Ok. Now let's begin by breaking it. Enter this into a terminal:
git config --global diff.external meld
Then navigate to a Git tracked directory and enter this (with an actual filename):
git diff filename
Meld will open but it will complain about bad parameters. The problem is that Git sends its external diff viewer seven parameters when Meld only needs two of them; two filenames of files to compare. One way to fix it is to write a script to format the parameters before sending them to Meld. Let's do that.
Create a new python script in your home directory (or wherever, it doesn't matter) and call it diff.py.
#!/usr/bin/python
import sys
import os
os.system('meld "%s" "%s"' % (sys.argv[2], sys.argv[5]))
Now we can set Git to perform it's diff on our new script (replacing the path with yours):
git config --global diff.external /home/nathan/diff.py
git diff filename
This time when we do a diff it will launch Meld with the right parameters and we will see our visual diff.