Help: fastcgi connection refused

Greetings,
     I just started a new Rails app and it's dead in the
water. It appears to be something to do with my lighttpd server or
fastcgi. The error is '500 - internal server error'.

In lighttpd.access.log I get:
2008-09-08 22:40:21: (mod_fastcgi.c.1743) connect failed: Connection
refused on
unix:/Users/William/Projects/rails/hidden-spaces/tmp/sockets/fcgi.socket-0
2008-09-08 22:40:21: (mod_fastcgi.c.2912) backend died; we'll disable it
for 5 seconds and send the request to another backend instead:
reconnects: 0 load: 1
2008-09-08 22:40:24: (mod_fastcgi.c.2471) unexpected end-of-file
(perhaps the fastcgi process died): pid: 405 socket:
unix:/Users/William/Projects/rails/hidden-spaces/tmp/sockets/fcgi.socket-0
2008-09-08 22:40:24: (mod_fastcgi.c.3234) child exited, pid: 405 status:
1
2008-09-08 22:40:24: (mod_fastcgi.c.3281) response not received, request
sent: 924 on socket:
unix:/Users/William/Projects/rails/hidden-spaces/tmp/sockets/fcgi.socket-0
for /dispatch.fcgi , closing connection

I don't know if it's significant or not but when I stop the server I get
this:
Couldn't find any pid file in
'/Users/William/Projects/rails/hidden-spaces/tmp/pids' matching
'dispatch.[0-9]*.pid'
(also looked for processes matching
"/Users/William/Projects/rails/hidden-spaces/public/dispatch.fcgi")

When I try to start Webrick instead to see if that works, it doesn't
start and throws this error instead:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:278:in
`load_missing_constant': uninitialized constant ActiveRecord (NameError)
  from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:467:in
`const_missing'
  from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:479:in
`const_missing'
  from
/Users/William/Projects/rails/hidden-spaces/config/initializers/new_rails_defaults.rb:5
  from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in
`load'
  from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in
`load'
  from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:354:in
`new_constants_in'
  from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:502:in
`load'
  from
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/initializer.rb:475:in
`load_application_initializers'
   ... 17 levels...
  from
/usr/local/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/commands/server.rb:39
  from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
  from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
  from script/server:3

This is a bit out of my league. If anyone has any insight I would love
it.

Thanks,
     William

Greetings,
I just started a new Rails app and it's dead in the
water. It appears to be something to do with my lighttpd server or
fastcgi. The error is '500 - internal server error'.

Well the fact that I doesn't work with webrick either rather suggests
it's not a fastcgi problem

When I try to start Webrick instead to see if that works, it doesn't
start and throws this error instead:
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/de pendencies.rb:278:in
`load_missing_constant': uninitialized constant ActiveRecord (NameError)

Have you disable active_record in environment.rb ?

Fred

Frederick Cheung wrote:

Frederick Cheung wrote:

Have you disable active_record in environment.rb ?

Fred

Yes I did. The first errors I was getting were about not being able
to
find Sqlite. Since this site wont have a database I disabled
active_record. Is that causing my problem?

Yes it is, because you've still got initializers trying to set
activerecord properties. just comment out those bits in /Users/William/
Projects/rails/hidden-spaces/config/initializers/new_rails_defaults

Fred

Fred THANK YOU. I never would have found that on my own and it's good to
learn something more about how Rails works.

Thanks,
    William

Hi,
You can also face this error if your ruby path in public/dispatch.fcgi
is wrong.
George