Ruby a go-go

I’m visiting family this week, which has a real stop-and-go rhythm for getting anything done, which means it’s a good time to do “shallow” tasks like surveying a lot of tech from 10,000 feet.

I got Ruby installed on the ThinkPad1 - the one-click 1.82 was a lot easier than the many-click 1.84 version, and now it’s got me thinking about how I can use it online (more on that later, I’m sure). Dreamhost has Rails support now, but it’s pretty simple to do straight CGI stuff too:


#!/usr/bin/env ruby
puts "Content-Type: text/html\r\n\r\n"
puts "hello world"

The trick is to name the file with a .cgi extension - DH’s Apache doesn’t have support built in for .rb files

  1. (and technically on Ubuntu, but that was installed as a Virtual PC and really really really doesn’t seem to like when the box goes to sleep)