Lighttpd not working with 0.14.3 for me

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…

Thanks,
Rob

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?

Any ideas? Any help is appreciated.

This must have something to do with 0.14.3

Thanks,
Rob

If anyone can please give me some pointers, I’d very much appreciate it.

I reinstalled Debian according to this walkthrough: http://
brainspl.at/rails_stack.html

I deploy my Rails app with Switchtower.

Running Webrick works fine. Lighttpd runs fine too but when i call a
page, I get an empty page, plus either none or this error in
lighttpd.error.log:

2005-11-27 14:50:12: (log.c.75) server started
2005-11-27 14:50:18: (mod_fastcgi.c.2373) FastCGI-stderr: /usr/lib/
ruby/gems/1.8/gems/rails-0.14.3/lib/breakpoint.rb:25: warning:
already initialized constant Version
2005-11-27 14:50:18: (mod_fastcgi.c.2373) FastCGI-stderr:

This is a 0.14.3 app. Another 0.13.1 app that I have on the same
server WORKS with lighttpd - that’s what I find weird.

Thanks,
Rob

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:

“bin-environment” => ( “RAILS_ENV” => “development” )

And since I was on my production machine, the development db details
in database.yml were invalid of course…

Puh, what an ugly problem.

Gonna rest now,

Rob

It seems that there’s a problem with my Rails app, it has nothing to
do with Rails 0.14.3

Should have noticed this earlier. This almost drove me to insanity

Gonna track this down now.

Sorry for the noise

Cheers,
Rob