Christoffer
Christoffer

Reputation: 2411

Alternative to deprecated exception_notification gem in Rails?

I have, successfully, been using the exception_notification gem for many different apps and it is working fine in terms of my workflow etc. I like the reports, the convenience of getting emails etc. The gem hasn't been updated for 8 years (!) but still works fine with one exception - it bloats the memory for every 500-error. Maybe it is just my implementation of the app but I am quite sure I have done it according to spec (it will be another question in that case).

I have googled but can't find another gem that does the same thing: send me an email when my app crashes with a 500-error. What alternatives are there to the exception_notification gem?

Upvotes: 3

Views: 1205

Answers (1)

Bijendra
Bijendra

Reputation: 10025

There is already a forked version of this gem Exception notification. Explanation says:

The Exception Notification gem provides a set of notifiers for sending notifications when errors occur in a Rack/Rails application. The built-in notifiers can deliver notifications by email, Campfire, HipChat, Slack, Mattermost, IRC or via custom WebHooks.

So this is more enhanced version which can be used with multiple 3rd party applications. The link mentioned in github explain clearly the steps to start using this gem: Read me for Exception Notification

The mailing options and code is pretty much same:

Rails.application.config.middleware.use ExceptionNotification::Rack,
:email => {
:email_prefix         => "[PREFIX] ",
:sender_address       => %{"notifier" <[email protected]>},
:exception_recipients => %w{[email protected]},
:delivery_method => :smtp,
:smtp_settings => {
  :user_name => "bob",
  :password => "password",
  }
}

Upvotes: 4

Related Questions