Sean’s Obsessions

Sean Walberg’s blog

Installing ExceptionNotifier for Rails 3

I was just fighting with this, and being new to the Rails 3 way of things, the docs didn’t quite make sense.

Step 1 - Install the plugin

1
rails plugin install https://github.com/rails/exception_notification.git

Step 2 - Edit config/application.rb:

config/application.rb
1
2
3
4
5
6
7
  class Application
    # .....
    #  somewhere in this block put the following:
    config.middleware.use "::ExceptionNotifier",
      :email_prefix => "[MyApp Error] ",
      :sender_address => %{"notifier" },
      :exception_recipients => %w{youraddress@example.com}

3. Verify:

1
2
$ rake middleware | grep ExceptionNotifier
use ExceptionNotifier

Now you’ll get any application errors emailed to the addresses in the exception_recipients array.

Comments

I’m trying something new here. Talk to me on Twitter with the button above, please.