views:

675

answers:

3

I just upgraded to Rails 2.3.2.1 running Litespeed web server 4.0.5 and get the below error. I think it has something to do with setting up the Rack preference (server = Rack::Handler::LSWS) but not sure how to do it.


Also, I'm running the lateast ruby-lsapi

[root@idev logs]# gem list ruby-lsapi

ruby-lsapi (3.5, 3.3, 3.2)


2009-07-14 20:31:55.326 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [STDERR] /home/web/dev/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:22:in `__send__'
2009-07-14 20:31:55.326 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [STDERR] : 
2009-07-14 20:31:55.326 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [STDERR] undefined method `env_table' for nil:NilClass
2009-07-14 20:31:55.326 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [STDERR]  (
2009-07-14 20:31:55.326 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [STDERR] NoMethodError
2009-07-14 20:31:55.326 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [STDERR] )
2009-07-14 20:31:55.326 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [STDERR]  from /home/web/dev/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:22:in `dispatch_cgi'
2009-07-14 20:31:55.326 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [STDERR]  from /home/web/dev/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:102:in `dispatch_cgi'
2009-07-14 20:31:55.326 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [STDERR]  from /home/web/dev/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:28:in `dispatch'
2009-07-14 20:31:55.326 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [STDERR]  from /var/lsws/fcgi-bin/RailsRunner.rb:32
2009-07-14 20:31:56.606 [INFO] [208.68.173.115:57853-0#dev.halomonitor.com] connection to [uds://tmp/lshttpd/dev.halomonitor.com:_.sock] on request #0, confirmed: 1, Connection reset by peer!
2009-07-14 20:31:56.606 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] [uds://tmp/lshttpd/dev.halomonitor.com:_.sock] Request in process stage, fail with 503 
2009-07-14 20:31:56.606 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] oops! 503 Service Unavailable
2009-07-14 20:31:56.606 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] Content len: 0, Request line: 
GET / HTTP/1.1
2009-07-14 20:31:56.606 [NOTICE] [208.68.173.115:57853-0#dev.halomonitor.com] Redirect: #2, URL: /dispatch.lsapi


$ ruby script/about
About your application's environment
Ruby version              1.8.6 (i386-mswin32)
RubyGems version          1.3.1
Rack version              1.0 bundled
Rails version             2.3.2
Active Record version     2.3.2
Action Pack version       2.3.2
Active Resource version   2.3.2
Action Mailer version     2.3.2
Active Support version    2.3.2
Edge Rails revision       e47e2f3c5e23acc07918e3d34546b06c9c0c986c
Application root          c:/chirag no backup/rails-2.3.2.1
Environment               development
Database adapter          postgresql
Database schema version   20090709140613
A: 

From the error message undefined method env_table for nil:NilClass, it seem that the code is getting a not initialized value, and it is trying to execute the method env_table on that value.
What is the content of the line 22, in cgi_progress.rb?

kiamlaluno
A: 

I thought lightspeed was considered out of the running a while back...

Go for Phusion's Passenger. Way more flexible and easier to setup/configure. Gets rid of dealing with CGI altogether. Check it out, even if you don't go with it.

Lukas