If your Rails application’s primary users are on your company’s intranet, and you host your app using mongrel_cluster and Apache’s mod_proxy_balancer or something similar, you may have noticed a potentially unwanted side effect: users who cause exceptions in your application will get a stack trace instead of your configured error page, even when running in production mode. This is a good excuse to peek into the Rails internals and explain how Rails determines what page to display when it encounters an error.
Read the rest of this post