Premature end of script headers: dispatch.cgi


I am running ruby 1.8.4 and rails 1.0.0 with Apache 2. I made a simple
rails application called demo and also created a controller called say
and an action called hello which is working fine using webrick. To run
it under Apache I created a symlink demo1 which is linked to the
demo/public directory. If I run it using then I
get the “Rails- Welcome Aboard” page. However, the problem starts when I
try to access It gives, “Application
error: Rails application failed to start properly” When I do a tail -f
error_log then I get “Premature end of script headers: dispatch.cgi”.
Since I spent almost a day trying to work out the problem and visiting
several forums where most of the people advise on checking the
permission of log files and shebang in dispatch.cgi which I already
checked but now I am not sure what is wrong.

I would be really grateful if anyone could tell me what I might be doing

Thanks a lot in advance.

View this message in context:
Sent from the RubyOnRails Users forum at

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs