So I''ve been trying all day to get a small camping app I wrote up on
Textdrive to no avail.
Right now I''m getting a 500 error when I go to the site, and it spits
this
out (from lightty after i restart it and make a request to the app):
(eval):13:in `initialize'': undefined method `to_hash'' for
#<FCGI::Stream:0x83a35d8> (NoMethodError)
from (eval):44:in `run''
from /users/home/me/web/app/app.rb:227
from /users/home/me/web/app/app.rb:225
...the line in the app that it''s referring to (225) is in the
postamble, the
FCGI part:
if __FILE__ == $0
require ''fcgi''
Dir.chdir(File.dirname(__FILE__))
Appname::Models::Base.establish_connection :adapter =>
''sqlite3'',
:database => ''appname.db''
Appname::Models::Base.logger = Logger.new(''camping.log'')
Appname.create
FCGI.each do |req| # line 225
ENV.replace req.env
Appname.run(req.in, req.out) # line 227
req.finish
end
end
And just in case it helps, this is the vhost file from lightty for this app
(I''m running 2 rails apps on this server and they''re working
fine):
$HTTP["host"] =~ "appname\.mydomain\.com" {
server.document-root = base + "/web/appname/"
server.error-handler-404 = "appname.rb"
fastcgi.server = ( ".rb" =>
( "localhost" => (
"socket" => base +
"/var/run/appname-0.socket",
"bin-path" => base +
"/web/appname/appname.rb",
"max-procs" => 1,
"check-local" => "disable" )
)
)
}
The lightty error log is giving me this everytime I get that 500 error:
(mod_fastcgi.c.3215) response not received, request sent: 1236 on socket:
unix:/users/home/me/var/run/appname-0.socket-0 for
/users/home/me/web/appname/appname.rb , closing connection
Does it look familiar to anyone?
-tieg
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://rubyforge.org/pipermail/camping-list/attachments/20061001/4a265416/attachment-0001.html