Search code examples
ruby-on-rails-3.2runtime-errorproduction-environment

Passing RuntimeError to page in production mode


Running - for example - a CSV import method can generate errors.

In development mode, Rails will generate a RuntimeError in UrclassesController#import with useful information.

This, however, does not get passed in production mode.

Is there a way to capture Rails's RuntimeError and send it to a specific page?


Solution

  • For getting notified about exceptions in Production, the exception_notification gem may be what you're looking for. I believe it has handlers for various errors too.