I’m running Apache 2.0.43 on Windows XP and trying to setup erb (eruby?).
I receive the following in the apache error.log
[error] [client 10.0.0.2] Premature end of script headers: erb
My http.conf configuration contains:
AddType application/x-httpd-eruby .rhtml
Action application/x-httpd-eruby /cgi-bin/erb
I do not have mod_ruby nor mod_cgi installed. I can however execute
Perl and Ruby scripts in the cgi-bin directory.
I’m using the test eruby web page from the The Pragmatic Programmers help file:eruby example
- number <%=i%> <%end%>
Interestingly enough in running the a ruby script copied from the same help file
I was getting this error:
malformed header from script. Bad header=HTTP/1.0 200 OK: rubytest.rb
until I commented out the print statement that produces the header.
#print "HTTP/1.0 200 OK\r\n"
print "Content-type: text/html\r\n\r\n"
print “Hello World!\r\n”
So I tried a number of similar variations for the erb/rhmtl page with no success.
What am doing wrong here?