I'm trying to get this up and running, but I see "uninitialized constant ExceptionNotifier" whenever I start my server.
http://github.com/rails/exception_notification
In my Gemfile I have
gem "exception_notification", :git => "http://github.com/rails/exception_notification.git", :branch => "master"
I've tried putting the configuration as shown in the github readme inside of config/application.rb, config/environment.rb, and config.ru. I replaced "Whatever" with my application name.
All previous answers are outdated, you can now simply add this to your gemfile:
gem 'exception_notification', :require => 'exception_notifier'
And edit your production.rb config file as indicated in the readme:
config.middleware.use ExceptionNotifier,
:email_prefix => "[Exception] ",
:sender_address => %{"Exception Notifier" <[email protected]>},
:exception_recipients => %w{[email protected]}
Latest version of official gem works with Rails 3, you can find it here: https://github.com/smartinez87/exception_notification.
Next gem release will make the :require => 'exception_notifier'
option unnecessary.
Ok, its working now for me:
# Gemfile
gem "exception_notification", :git => "git://github.com/rails/exception_notification", :require => 'exception_notifier'
# application.rb, inside the config block
config.middleware.use ::ExceptionNotifier,
:email_prefix => "ApplicationName-Errors: ",
:sender_address => %w{[email protected]},
:exception_recipients => %w{[email protected]}
Keep it simple silly
In gemfile
gem 'exception_notification', :require => 'exception_notifier'
In application.rb file
config.middleware.use ExceptionNotifier,
:email_prefix => "[ERROR] ",
:sender_address => %{"Exception Notifier" <[email protected]>},
:exception_recipients => %w{[email protected]}
Your are Done.. :*
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