gem 'exception_notification'
bundle install
2. In config/environments/production.rb:
Whatever::Application.config.middleware.use ExceptionNotification::Rack,
:email => {
:email_prefix => "[Whatever] ",
:sender_address => %{"notifier"
:exception_recipients => %w{exceptions@example.com}
}
3. Configure ActionMailer, in config/environments/production.rb:
I am using Sendgrid SMTP API so:
config.action_mailer.delivery_method = :smtp
If you have sendmail installed on the production server:
config.action_mailer.delivery_method = :sendmail
4. In production.rb:
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true