Generate dynamic error pages in a Rails application