From: "Jon A. Lambert" Date: 2004-01-06T11:41:47+09:00 Subject: Problems getting Apache 2.0.43 and erb to work 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

Enumeration

Environment variables

<%ENV.keys.sort.each do |key|%> <%end%>
<%=key%><%=ENV[key]%>
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. #!c:\apps\ruby\bin\ruby # #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? Thanks