Forum: Rails deployment Premature end of script headers: dispatch.cgi

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
77fd7eb6eca0f1c423670e7616b15277?d=identicon&s=25 RailsRoller (Guest)
on 2007-05-06 13:56
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
77fd7eb6eca0f1c423670e7616b15277?d=identicon&s=25 RailsRoller (Guest)
on 2007-05-07 16:59
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?
91875348ccdd3461544d26131cbdb47a?d=identicon&s=25 Syed Arif (syedarif)
on 2007-05-08 18:01
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....
77fd7eb6eca0f1c423670e7616b15277?d=identicon&s=25 RailsRoller (Guest)
on 2007-05-09 12:42
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!
91875348ccdd3461544d26131cbdb47a?d=identicon&s=25 Syed Arif (syedarif)
on 2007-05-14 07:59
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.
9ea2354799edfae048a62be349888275?d=identicon&s=25 Mario Jauvin (mario)
on 2009-01-25 00:34
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.
9ea2354799edfae048a62be349888275?d=identicon&s=25 Mario Jauvin (mario)
on 2009-01-25 00:35
Mario Jauvin wrote:
> going on change your current directory to the public_html/appdir/public

Of course, appdir above is the directory for your rails application.
This topic is locked and can not be replied to.