Rich Brant wrote:
When in production mode, when an error occurrs I get the white screen error:
Application error (Rails),
And, I can't seem to override the method rescue_action_in_public, even
though I'm *certain* local_request? is returning false.
What is the error, and where are you redefining
Some Rails errors sort of occur before your controller ever enters the
picture (don't ask me for details!). If you're redefining
rescue_action_in_public in your controller (or even in your
ApplicationController, I think), errors like that will trigger the
built-in rescue_action_in_public since Rails hasn't reached your
Maybe this is what's happening in your app? It's hard to tell without
knowing what the exception is, where it's occurring
where you're redefining the method.
In my apps I redefine rescue_action_in_public in a little 'support'
file in /lib that I include in environment.rb. It seems to catch pretty
when RoutingError, UnknownAction then
'404.html')), "404 Not Found")
'500.html')), "500 Internal Error")
(I'm pretty sure I just copy-pasted this from somewhere in the past,
but I can't remember from where that might have been.)