From: Rasputin Date: 2003-12-18T14:53:57+09:00 Subject: Re: Ruby as CGI with Apache on Linux * Zach Dennis [1204 01:04]: > I feel bad for asking this question, but I am going to pull my hair out with > this. I recently got Ruby to run as a cgi under Apache2/Win2k combination. > Works great. I am now trying to do the same thing on Apache2/Redhat9 combo, > but to no avail. I keep getting the Server Error 500, premature end of > script headers. > ----------------------------------------------------- > #!/usr/local/bin/ruby > print "Content-type: text/html\r\n" Change to ' print "Content-type: text/html\n\n" ' > print "Hello" > I was having this problem on my windows box at first but then I changed the > first line to read: > #! ruby > and it has worked ever since. However I have changed the first line on my > test.rb file on the Linux box to the following variations: > #! ruby > #!/usr/local/bin/ruby > #!/bin/ruby > #!/bin/env ruby > #! /bin/env ruby Run 'which ruby' in a shell and set the path in the shebang line (the #! line above to whatever you get back). -- All progress is based upon a universal innate desire on the part of every organism to live beyond its income. -- Samuel Butler, "Notebooks" Rasputin :: Jack of All Trades - Master of Nuns