Dispatch.cgi Problem

Hey all,

I’ve been battling with ruby configurations for days now…trying to get
either SCGI or FCGI to work on my Apache 1.3/Linux Red Hat 3 server.

I’ve pretty much gave up that battle since either of them will work with
me after trying dozens of configurations, but now even when I try to run
apps with dispatch.cgi I get this error in my log: “Premature end of
script headers: /home/mysite/mydir/rubyapp/public.dispatch.cgi”

I’ve double checked my chomd on dispatch.cgi, etc… (which is 755), my
shebang line is correct, my .htaccess is perfect, i dont get it.

I can code a full functional ruby app in 30 minutes, but then spend
about 3 days figuring out how to deploy it :-/

Any help would be much appreciated!

Eric wrote:

I’ve been battling with ruby configurations for days now…trying to get
either SCGI or FCGI to work on my Apache 1.3/Linux Red Hat 3 server.

I’ve pretty much gave up that battle since either of them will work with
me after trying dozens of configurations, but now even when I try to run
apps with dispatch.cgi I get this error in my log: “Premature end of
script headers: /home/mysite/mydir/rubyapp/public.dispatch.cgi”

When I had the same problem it was due to a different UID not being
able to read the old sessions in /tmp. Try deleting them.

Are you getting anything in your Rails log?


We develop, watch us RoR, in numbers too big to ignore.

same story here, but I finally got mine up and running. What do you
get when you request the file at the command line? Likely a 500
errror, but it may also tell you wha the issue is.

On 1/30/06, Mark Reginald J. [email protected] wrote:

When I had the same problem it was due to a different UID not being
http://lists.rubyonrails.org/mailman/listinfo/rails


http://brantinteractive.com
[email protected]
4034 skippack pike
v. 267.640.2195
f. 215.689.1454

My problem was that the dispatch wasn’t getting the

require ‘fcgi_handler’

so I had to hand copy this from my rails gem directory to the apps lib/
directory and it all worked. Obviously not the best solution, but this
was the root of the problems.

Andrew

Rich B. wrote:

same story here, but I finally got mine up and running. What do you
get when you request the file at the command line? Likely a 500
errror, but it may also tell you wha the issue is.

On 1/30/06, Mark Reginald J. [email protected] wrote:

When I had the same problem it was due to a different UID not being
http://lists.rubyonrails.org/mailman/listinfo/rails


http://brantinteractive.com
[email protected]
4034 skippack pike
v. 267.640.2195
f. 215.689.1454

No luck, deleted my /tmp ruby files and ran dispatch from command line,
got a 500 Server Error, also not getting anything in Rails log.

Have no clue what it could be, after a triple check, everything seems
configured properly, do I have any other options?