While I was getting some old Ruby code of mine out to convert ruby code to pretty HTML-formatted code suitable for blogging from Wolfman’s Howlings I got the following error:

$ ./ruby2html.rb 
./ruby2html.rb: line 9: require: command not found
./ruby2html.rb: line 10: require: command not found
./ruby2html.rb: line 11: require: command not found
./ruby2html.rb: line 14: syntax error near unexpected token `('
./ruby2html.rb: line 14: `    code= File.read(ARGV[0])'

Never saw this problem before, but obviously it was frustrating.

What had happened was I hadn’t deleted the tab spaces before the #!/usr/bin/env ruby line.

Apparently if there is any white space before the #!/usr/bin/env ruby the script will not run.

Swell.. 😐