You're missing the CGI part of CGI :-)

You need to tell your web server that when it encounters a Ruby file,
it should execute it instead of just treating it like a file. That
config varies from server to server, so check your web server's docs.

Other tips:

* make it executable
* put the #! on line one, not line 2
* you probably don't want to emit the status line ("200 OK") --
usually the server itself emits that and you start with the headers
(or with the body)

 - A