Exception notification - moralesalberto/personal GitHub Wiki

To get this setup, just add the gem 'exception_notification' to your Gemfile.

gem 'exception_notification'

Then in your environments/production.rb file add the config for exception notification. For rails 4 it is like this:

  config.middleware.use ExceptionNotification::Rack,
    :email => {
    :email_prefix => "[personal] ",
    :sender_address => %{"notifier" <[email protected]>},
    :exception_recipients => %w{[email protected]}
  }

That's it. Try it by editing a file in production, touching the tmp/restart.txt file and trying to hit that view. It will blow up and you will get an email with the error description.