We are using this gem(https://github.com/smartinez87/exception_notification) with rails 3.2.11. We want to use following method "ExceptionNotifier.notify_exception(e)" from action of controller and from background process as mentioned on the wikie but we are getting following error
undefined method `notify_exception' for ExceptionNotifier:Class
We are installing 3.0.1 version of this gem. gem "exception_notification", "~> 3.0.1"
Our rails version is 3.2.11 and ruby version is ruby 1.9.2p320.
Thanks
In general, ExceptionNotification will send a notification when every error occurs, which may result in a problem: if your site has a high throughput and a particular error is raised frequently, you will receive too many notifications.
Exception Notification. 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, Amazon SNS or via custom WebHooks.
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, Teams, IRC, Amazon SNS, Google Chat, Datadog or via custom WebHooks.
In order to use ExceptionNotification as an engine, just run the following command from the terminal: This command generates an initialize file ( config/initializers/exception_notification.rb) where you can customize your configurations.
You're reading an API for notify_exception
for a version that has yet to be released as a gem.
You can either point your Gemfile
at the git repo
gem "exception_notification", git: "git://github.com/smartinez87/exception_notification.git"
or use the proper API call for 3.0.1
ExceptionNotifier::Notifier.exception_notification(request.env, exception,
:data => {:message => "was doing something wrong"}).deliver
The docs for 3.0.1
are here.
In your gem file just write this line
gem 'exception_notification' , '3.0.1'
and after that
bundle install
this works for me :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With