From: Irv Mullins Date: 2002-05-11T06:23:49+09:00 Subject: Re: Premature end of script headers ccos wrote: > hello, > i'm new to ruby, unix, apache, and cgi, so i feel like i'm wrestling a > four headed dragon, well more like wrestling a three headed dragon and > patting a friendly goat. > i keep getting: > Premature end of script headers: /Library/WebServer/CGI- > Executables/cgiTrial2.cgi > in my apache error log. > im running os x with Marc Liyanage's distro, freshly installed. > i don't think it's not a permissions problem, the file is chmod 755'd. > my file is called cgiTrial2.cgi and contains: > > #!/usr/local/bin ruby << i think this is right? First find out where it is: >which ruby /usr/bin/ruby Then, for me, at least, I had to change the first line to: #!/usr/bin/ruby (get rid of the space before ruby) and it works. Regards, Irv