Premature end of script headers: dispatch.cgi

Hi!

I’m trying to setup rails in my remote server: fedora-core-4-x86_64
running on vps.

Apache is already installed… and i installed ruby / gems / rails
manually via ssh. when i’m creating a rails app and placing a sym link
in httpdocs to its public directory… the “welcome aboard” page is
running (simple html) but none of my controllers is working…

I verified rights for directories / files but i’m always recieving :

Application error
Rails application failed to start properly

And in the server log files , i have: “Premature end of script headers:
dispatch.cg”

Many people in the recommend the fcgi and mod_fcgi… but i want get
applicatuion running with cgi first!

Thanks in advance

Maybe this is a very wide question…

Is there any config to do in the apache files to tell him that we are
running on rails ? or does the rails install made sth that i can check?

The first thing that comes to my mind if i see this error is problem
with your ruby path in the dispatch.cgi file.You can go a head with
dispatch.fcgi. It worked for me…its cool…

Syed Arif wrote:

The first thing that comes to my mind if i see this error is problem
with your ruby path in the dispatch.cgi file.You can go a head with
dispatch.fcgi. It worked for me…its cool…

I’m choosing cgi just because i’m still in development/test stage… and
the ruby path is unfortunately correct!

Syed Arif wrote:

RailsRoller wrote:

Syed Arif wrote:

The first thing that comes to my mind if i see this error is problem
with your ruby path in the dispatch.cgi file.You can go a head with
dispatch.fcgi. It worked for me…its cool…

I’m choosing cgi just because i’m still in development/test stage… and
the ruby path is unfortunately correct!

As far as i am concerned, the error is due to some setup problem only,
nothing to do with ur rails application. I suggest u to move forward
with the fcgi, cause that is the standard way if you are deploying in
apache.

the reason you are getting this error is because dispath.cgi is not
generating proper HTTP headers because of an error. To find out what is
going on change your current directory to the public_html/appdir/public
then type:

./dispatch.cgi

and you should find out what the problem is.

RailsRoller wrote:

Syed Arif wrote:

The first thing that comes to my mind if i see this error is problem
with your ruby path in the dispatch.cgi file.You can go a head with
dispatch.fcgi. It worked for me…its cool…

I’m choosing cgi just because i’m still in development/test stage… and
the ruby path is unfortunately correct!

As far as i am concerned, the error is due to some setup problem only,
nothing to do with ur rails application. I suggest u to move forward
with the fcgi, cause that is the standard way if you are deploying in
apache.

Mario J. wrote:

going on change your current directory to the public_html/appdir/public

Of course, appdir above is the directory for your rails application.