Forum: Ruby on Rails LightHTTPD FastCgi Error in Production Mode

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Matthew F. (Guest)
on 2006-05-11 15:58
I've been banging my head against the following for about 8 hours now,
and have exhausted my web research options:

/usr/home/matthew.feadler/rails/avclfc/public/dispatch.fcgi:21:in
`require': no such file to load --
/usr/home/matthew.feadler/rails/avclfc/public/../config/environment
(LoadError)
        from
/usr/home/matthew.feadler/rails/avclfc/public/dispatch.fcgi:21
2006-05-11 04:21:12: (mod_fastcgi.c.1048) the fastcgi-backend
/usr/home/matthew.feadler/rails/avclfc/public/dispatch.fcgi failed to
start:
2006-05-11 04:21:12: (mod_fastcgi.c.1052) child exited with status 1
/usr/home/matthew.feadler/rails/avclfc/public/dispatch.fcgi
--SNIP--
2006-05-11 04:21:12: (mod_fastcgi.c.1356) [ERROR]: spawning fcgi failed.
2006-05-11 04:21:12: (server.c.834) Configuration of plugins failed.
Going down.
no such file to load --
/usr/home/matthew.feadler/rails/avclfc/public/../config/environment
(LoadError)

My app works beautifully via WebRICK, both in Development and Production
modes.

My Lighty fcgi config is as follows:

fastcgi.server = ( ".fcgi" =>
  ( "AVCNotes" =>
    (
     "min-procs" => 1,
     "max-procs" => 5,
     "socket" => "/tmp/rails.socket",
    "bin-path" =>
"/usr/home/matthew.feadler/rails/avclfc/public/dispatch.fcgi",
     "bin-environment" => ( "RAILS_ENV" => "production" )
    )
  )
)

I've tried this both with and without the
  ENV['RAILS_ENV'] ||= 'production'
line in environment.rb.

It may be pertinent that I'm using Lighty now because I was originally
having fcgi issues with Apache, and suspected Apache was the culprit.
Given subsequent events, I was likely wrong; but apart from this issue
I've grown to like Lighty, and so will be sticking with it.

Thanks in advance,

-ELf
Ben R. (Guest)
on 2006-05-11 17:20
(Received via mailing list)
Hi ~

The problem might be in another part of the config.  What are you
globally setting the document root to?

Just a thought...

~ Ben

On 5/11/06, Matthew F. <removed_email_address@domain.invalid> wrote:
> /usr/home/matthew.feadler/rails/avclfc/public/dispatch.fcgi failed to
>
>      "socket" => "/tmp/rails.socket",
>
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Ben R.
303-947-0446
http://www.benr75.com
Ben R. (Guest)
on 2006-05-11 17:26
(Received via mailing list)
Full Example:

$HTTP["host"] =~ "my.com" {
  server.document-root = "/MY/PATH/public/"
  server.error-handler-404 = "/dispatch.fcgi"
  server.indexfiles = ( "dispatch.fcgi" )
  url.rewrite              = ( "^/$" => "index.html", "^([^.]+)$" =>
"$1.html" )
  accesslog.filename = "/MY/PATH/log/access.log"
  fastcgi.server = ( ".fcgi" =>
    ( "localhost" =>
        (
          "min-procs" => 1,
          "max-procs" => 1,
          "socket"    => "/MY/SOCKET/PATH/fcgi.socket",
          "bin-path"  => "/MY/BIN/PATH/public/dispatch.fcgi",
          "bin-environment" => ( "RAILS_ENV" => "production" )
        )
    )
  )
}

On 5/11/06, Ben R. <removed_email_address@domain.invalid> wrote:
> > I've been banging my head against the following for about 8 hours now,
> > start:
> > My app works beautifully via WebRICK, both in Development and Production
> >     "bin-path" =>
> > It may be pertinent that I'm using Lighty now because I was originally
> > _______________________________________________
>
--
Ben R.
303-947-0446
http://www.benr75.com
Matthew F. (Guest)
on 2006-05-11 18:02
Ben R. wrote:

> The problem might be in another part of the config.  What are you
> globally setting the document root to?

As it turns out, the problem was an issue of permissions on the config
folder.  The directory was not readable by my webserver user.

As usual, the hardest problems to solve end up being the easiest to fix.
:P

Thanks much,

-ELf
This topic is locked and can not be replied to.