Joe Yates' Blog

A Beginner’s Sinatra Tutorial

In the olden days your first program was probably in BASIC and was run from the command line, nowadays the equivalent is Web programming.

Using Sinatra reminds me of my first programming experiences - you write a tiny bit of code, with no boilerplate and get to see a result.

Editing Javascript in Emacs

Steve Yegge of Google has created a new Javascript mode ‘js2-mode’ for Emacs.

It works very well as it uses true parsing, not heuristics, to analyse code.

Setting Up PostGIS


You can install PostGIS as a package or from sources. Sometimes the version available from Linux distributions is a bit out of step with the PostgreSQL version that gets installed (i.e. Ubuntu currently installs PostgreSQL 8.4, but only has PostGIS 8.3)

JRuby on Rails

Which Java Version?

JRuby is normally run on the “official” Sun (now Oracle) Java. Some people seem to be able to get it to run on GNU Java (GCJ), but I suggest sticking with Sun Java to get you started.

Which Type of Installation?

First of all you should decide where to install JRuby - do you want to install it for all system users or just for your own user?

Handling Multiple Versions of Ruby

Currenly, I am developing with 3 different versions of Ruby:

  1. MRI Ruby 1.8.7
  2. MRI Ruby 1.9.1
  3. JRuby 1.4.0

I need a quick way to switch betwwen the three main Ruby executables, and the related other programs (gem, irb, etc).

I have set up Debian Alternatives to handle the job.