you can run your cgi script from a command line thus: 'ruby script.cgi'
just set REQUEST_URI environment variable to set the url.

konstantin