Plugins - Exception Notifier
Add to favoritesThe Exception Notifier plugin provides a mailer object and a default set of templates for sending email notifications when errors occur in a Rails application. The plugin is configurable, allowing programmers to specify:
- the sender address of the email
- the recipient addresses
- the text used to prefix the subject line
The email includes information about the current request, session, and environment, and also gives a backtrace of the exception.
http://dev.rubyonrails.org/svn/rails/plugins/exception_notification/
Rails' (MIT)
Misc. Enhancements


I recently upgraded my app to rail 2.1 . I was running it in 1.2.3 all while.
I hit this error: ActionView::TemplateFinder::InvalidViewPath (Unprocessed view path found: ... vendor/plugins/exception_notification/lib/../views"
Has any faced this? How do I solve it?
Thanks in Advance, Sandeep G
Hello.
For the life of me, I cannot get the Exception Notification plugin to send email when in development mode. When tracing with the debugger it seems that no exception handlers are regsitered [rescue.rb: if rescueactionwithhandler(exception)]. As a result, ExceptionNotifiable.rescueaction_in_public never executes.
If you have any thoughts, I'd love to hear them.
NOTES
[environment.rb]
Rails::Initializer.run do |config| config.actioncontroller.considerallrequestslocal = false end
ExceptionNotifier.exception_recipients = %w(u...@website.com) ExceptionNotifier.sender_address = %w(serv...@website.com)
[application.rb]
class ApplicationController < ActionController::Base include ExceptionNotifiable local_addresses.clear end
I keep getting a warning starting up my rails application warning: already initialized constant VIEW_PATH warning: already initialized constant APP_PATH warning: already initialized constant PARAMFILTERREPLACEMENT
It started when I moved my app from 1.1.6 to 1.2.3.
I was having trouble with it in a project, and found this: http://dev.rubyonrails.org/ticket/9940
Then it began working for me!
To test under development mode, add alias :rescueactionlocally :rescueactionin_public in your ApplicationController (don't know why the underscore dissapear when copy-pasted!)
This is the correct string: "%-*s:"
In ruby 1.8.6p111, rendering the _environment.rhtml plugin fails with "TemplateError: flag after width". This is fixed if you change the string "%-s" to "%-s" on line three of the template.
Note, this plugin hooks into ActionController::rescueactionin_public()
If you're working in your development environment or on your local machine, this won't be called and the plugin won't send e-mail.
If you want to just try this out, throw this line at the bottom of app/controllers/application.rb:
alias :rescueactionlocally :rescueactionin_public
Assume you can send mail and you configured the plugin, voila! It works in development.
Thanks for a highly useful plugin.
I'm using Rails 1.2.3 and the plugin works just fine.
You can get an updated version of this that should work with Rails 1.2 from the Caboo.se sample app.
http://sample.caboo.se/
Same problem with Rails 1.2 this article (http://www.mathewabonyi.com/articles/2007/02/18/initial-reactions-to-rails-12-annoyed/) talks about it, but does not really offer a solution
This seems to break on Rails 1.2:
I keep getting the following error message: Expected /Users/aselder/BostonLogic/match/config/../vendor/plugins/exceptionnotification/lib/exceptionnotifier.rb to define ExceptionNotifier