From: nobu.nokada@... Date: 2002-05-11T13:47:11+09:00 Subject: Re: Premature end of script headers Hi, At Sat, 11 May 2002 13:20:47 +0900, ccos wrote: > > That's why it is better to use: > > #!/usr/bin/env ruby #note the space before ruby > > This seems to work everywhere. Not everywhere, I heared some systems have /bin/env instead. > yeah they had it like that in the practical programmer book, and > that's why i originally tried it with a space, on my system, > usr/bin/env is a file, and not a directory. is it a file in your > example as well. what exactly is going on with the space? i guess it's > time for me to hit the unix books a little harder. i'm a bit > stumped. anybody out there using ruby cgi scripts on os x? > thanks much, /usr/bin/env is a command sets environment variables and execs other command. In this case, it sets no variable but execs "ruby" searching from PATH. So replace #! line with exact full path name of ruby. At Sat, 11 May 2002 13:33:55 +0900, ccos wrote: > it does the same with '/usr/bin/env ruby' and 'usr/local/bin/ruby' Did you wrote "#!usr/local/bin/ruby"? So don't forget first slash. > p.s. maybe i'm using the wrong ruby? usr/local/bin has only two files > in it ruby and irb. would this be the right ruby? i think it is? Correct. The other files are under /usr/local/lib/ruby. -- Nobu Nakada