Duane Johnson
2005-Jul-02  22:01 UTC
Lighttpd bin-environment=''production'' not quite production
I have two solve-the-mystery questions regarding my new Lighttpd  
configuration:
1. While I do have the following bin-environment set to production,  
I''m getting development-style rails error messages rather than the  
500.html document:
fastcgi.server = ( ".fcgi" =>
   ( "filmfury" =>
     (
       "min-procs" => 1,
       "max-procs" => 5,
       "socket" => "/tmp/filmfury1.socket",
       "bin-path" => "/home/users/filmfury/application/public/
dispatch.fcgi",
       "bin-environment" => ( "RAILS_ENV" =>
"production",
"RAILS_ROOT" => "/home/users/filmfury/application/" )
     )
   )
)
Mysteriously, however, it is the "production.log" file which  
helpfully reports the next (following) error, so I''m pretty certain  
my app is actually in ''production'' mode.  How can I get it to
display
the production-style 500.html page?
2. When my app tries to access a cached page, I get the following  
error.  It looks like the "http"  part of the URL is somehow making  
its way in to the caching code somehow.  Any ideas why this would be  
springing up on a new Lighttpd config? (It wasn''t doing this under  
Apache/FCGI):
Errno::EACCES (Permission denied - /home/users/filmfury/application/ 
public/../config/..//publichttp:):
/usr/local/lib/ruby/1.8/fileutils.rb:181:in `mkdir''
/usr/local/lib/ruby/1.8/fileutils.rb:181:in `makedirs''
/usr/local/lib/ruby/1.8/fileutils.rb:179:in `reverse_each''
/usr/local/lib/ruby/1.8/fileutils.rb:179:in `makedirs''
/usr/local/lib/ruby/1.8/fileutils.rb:173:in `each''
/usr/local/lib/ruby/1.8/fileutils.rb:173:in `makedirs''
/vendor/rails/actionpack/lib/action_controller/caching.rb:85:in  
`cache_page''
/vendor/rails/actionpack/lib/action_controller/caching.rb:129:in  
`cache_page''
Duane Johnson
(canadaduane)
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails
Ezra Zygmuntowicz
2005-Jul-03  02:29 UTC
Re: Lighttpd bin-environment=''production'' not quite production
Duane-
     I am pasting in the fcgi portion of my lighttpd config file that  
has been working flawlessly.
fastcgi.server= (".fcgi" =>
    ("foo Anyname can go here" =>
       (
          "socket" =>
"/home/*username*/var/lighttpd-fcgi.socket",
          "bin-path" =>
"/home/*username*/_path-to-public-directory_/
_path-to-RubyOnRails-.fcgi-file_",
          "bin-environment" => ("RAILS_ENV" =>
"production" ),
          "max-load-per-proc" => 25,
          "min-procs" => 1,
          "max-procs" => 4,
          "idle-timeout" => 60
          )
    )
)
}
Notice how I don''t reference RAILS_ROOT in the bin environment. When  
I tried to do it the way you are doing it I got errors. So when I  
removed the RAILS_ROOT=> part of the config it worked great.
-Ezra
On Jul 2, 2005, at 3:01 PM, Duane Johnson wrote:
> I have two solve-the-mystery questions regarding my new Lighttpd  
> configuration:
>
> 1. While I do have the following bin-environment set to production,  
> I''m getting development-style rails error messages rather than the
> 500.html document:
>
> fastcgi.server = ( ".fcgi" =>
>   ( "filmfury" =>
>     (
>       "min-procs" => 1,
>       "max-procs" => 5,
>       "socket" => "/tmp/filmfury1.socket",
>       "bin-path" =>
"/home/users/filmfury/application/public/
> dispatch.fcgi",
>       "bin-environment" => ( "RAILS_ENV" =>
"production",
> "RAILS_ROOT" => "/home/users/filmfury/application/"
)
>     )
>   )
> )
>
> Mysteriously, however, it is the "production.log" file which  
> helpfully reports the next (following) error, so I''m pretty
certain
> my app is actually in ''production'' mode.  How can I get
it to
> display the production-style 500.html page?
>
> 2. When my app tries to access a cached page, I get the following  
> error.  It looks like the "http"  part of the URL is somehow
making
> its way in to the caching code somehow.  Any ideas why this would  
> be springing up on a new Lighttpd config? (It wasn''t doing this  
> under Apache/FCGI):
>
> Errno::EACCES (Permission denied - /home/users/filmfury/application/ 
> public/../config/..//publichttp:):
>
> /usr/local/lib/ruby/1.8/fileutils.rb:181:in `mkdir''
> /usr/local/lib/ruby/1.8/fileutils.rb:181:in `makedirs''
> /usr/local/lib/ruby/1.8/fileutils.rb:179:in `reverse_each''
> /usr/local/lib/ruby/1.8/fileutils.rb:179:in `makedirs''
> /usr/local/lib/ruby/1.8/fileutils.rb:173:in `each''
> /usr/local/lib/ruby/1.8/fileutils.rb:173:in `makedirs''
> /vendor/rails/actionpack/lib/action_controller/caching.rb:85:in  
> `cache_page''
> /vendor/rails/actionpack/lib/action_controller/caching.rb:129:in  
> `cache_page''
>
> Duane Johnson
> (canadaduane)
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-Ezra Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
509-577-7732
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails