Handling custom error files (404/500) in Rails 3

I've been looking at rescue_from and rescue_action_in_public however, none of them have worked without making a catch-all route.

So currently, my solution is to use the catch-all route: match '*path' => "controller#action" # custom 404 which then renders a 404 with the appropriate layout whether the user is logged in or not. I've also set up a rescue_from to handle ActiveRecord::RecordNotFound errors.

It feels like an unsatisfactory solution, and I'm not dealing with 500 errors at all. I would like to keep the informative errors that rails gives during development, but simply have a choice to render a non- static page in production.

Help appriciated.