I’m almost sure I’m doing something wrong here, but I don’t know what
it is. Maybe someone has stumbled upon this and can help me.
I can’t start lighttpd+fcgi for my rails app. It’s a 0.14.3 rails
app. Weird thing is, an old 0.13.1 rails app works fine with
lighttpd. Here’s the error I get:
root@va2005:/var/www/myrailsapp/current# ./script/server
=> Booting lighttpd (use ‘script/server webrick’ to force WEBrick)
=> Rails application started on http://0.0.0.0:3000
=> Call with -d to detach (requires absolute paths in config/
lighttpd.conf)
=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)
2005-11-26 02:02:17: (log.c.75) server started
2005-11-26 02:02:31: (mod_fastcgi.c.2373) FastCGI-stderr: /usr/local/
lib/ruby/gems/1.8/gems/rails-0.14.3/lib/breakpoint.rb:25: warning:
already initialized constant Version
2005-11-26 02:02:31: (mod_fastcgi.c.2373) FastCGI-stderr:
/usr/local/lib/ruby/1.8/drb/drb.rb:567:in load': connection closed (DRb::DRbConnError) from /usr/local/lib/ruby/1.8/drb/drb.rb:629:in recv_reply’
from /usr/local/lib/ruby/1.8/drb/drb.rb:918:in recv_reply' from /usr/local/lib/ruby/1.8/drb/drb.rb:1192:in send_message’
from /usr/local/lib/ruby/1.8/drb/drb.rb:1083:in method_missing' from /usr/local/lib/ruby/1.8/drb/drb.rb:1167:in open’
from /usr/local/lib/ruby/1.8/drb/drb.rb:1082:in method_missing' from /usr/local/lib/ruby/1.8/drb/drb.rb:1100:in with_friend’
from /usr/local/lib/ruby/1.8/drb/drb.rb:1081:in method_missing' from /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/ breakpoint.rb:386:in activate_drb’
from /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/
initializer.rb:169:in load_environment' from /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/ initializer.rb:150:in load_environment’
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/
lib/active_support/core_ext/kernel.rb:27:in silence_warnings' from /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/ initializer.rb:147:in load_environment’
from /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/
initializer.rb:78:in process' from /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/ initializer.rb:40:in run’
from /var/www/myrailsapp/current/public/…/config/
environment.rb:10
from /var/www/myrailsapp/current/public/dispatch.fcgi:21
Apparently it’s that weird DRb error that’s killing it.
Any ideas/pointers/hints?
Been trying to get this running for a couple of hours now. Gonna rest
now for a while…
I don’t get this, I now get a slightly different error:
root@va2005:/var/www/mysite/current# ./script/server
=> Booting lighttpd (use ‘script/server webrick’ to force WEBrick)
=> Rails application started on http://0.0.0.0:3001
=> Call with -d to detach (requires absolute paths in config/
lighttpd.conf)
=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)
2005-11-26 11:13:50: (log.c.75) server started
(here I make a request to http://www.mysite.com:3001)
2005-11-26 11:13:54: (mod_fastcgi.c.2373) FastCGI-stderr: /usr/local/
lib/ruby/gems/1.8/gems/rails-0.14.3/lib/breakpoint.rb:25: warning:
already initialized constant Version
2005-11-26 11:13:54: (mod_fastcgi.c.2373) FastCGI-stderr:
Lighttpd works with a 0.13.1 app though… Is this a bug?
Just in case anyone’s interested (yeah right), it boils down to this:
I had:
config.action_controller.session_store = :active_record_store
activated in my environment.rb, but issuing the command:
ruby script/server lighttpd -e production
does not actually start lighttpd in production, but in development
mode. That’s because lighttpd doesn’t listen to that command line
argument, but instead listens to the fcgi environment variables from
lighttpd.conf, and they were: