Problems with Amrita2 and HTTP headers.

W

Wayne Pierce

I'm experimenting with different Ruby-based web development tools, but
can't get Amrita2 working. For some reason I keep getting "FastCGI:
incomplete headers (0 bytes) received from server" in the Apache logs.

I've tried the examples as shown and added in an explicit
"Content-Type" header, but neither works. I know the FastCGI works
normally since I can run a simple Ruby script with no problems.

Does anyone know what I am missing?

Thanks for any help,

Wayne
 
J

Jeff Barczewski

You might try running it from Webrick first to see if it is something
specific to FastCGI or what. I'm not sure what could be wrong though I
haven't moved to using FastCGI yet. All my tests with Webrick, Amrita2
worked just fine.

Jeff
 
W

Wayne Pierce

Jeff,

Thanks for the reply, I did manage to make some progress in narrowing
down where the problem is. Apparently the issue is the line:

tmpl.expand(STDOUT, PO.new)

When I comment that out there are no errors (no data either). Amrita2
worked fine from irb as well. I haven't been able to find the code
responsible for returning data yet, none of the following worked
either:

content =3D tmpl.expand(STDOUT, PO.new)
tmpl.expand(content, PO.new)
tmpl.expand:)content, PO.new)

With the lines above I was trying to capture the response and then
pass that to the cgi.out.

Thanks again,

Wayne
 
W

Wayne Pierce

Ok...I figured it out.

First I had to set a variable, in this case "content". Then I could use:

tmpl.expand(content, PO.new)

Previously I hadn't created the variable content before, I figured
Ruby would do that for me.

Wayne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top