vendredi 13 mars 2015

Add slack to exception-notification gem

I have a Rails 3.2.8 app using Ruby 1.9.3. I am trying to configure slack integration to work with execption_notification. execption_notification works fine for mail, but after adding slack integration based on the readme HERE I get this error when trying to start the server...


exception_notifier.rb:102:in `rescue in create_and_register_notifier': No notifier named 'slack' was found. Please, revise your configuration options. Cause: uninitialized constant ExceptionNotifier::SlackNotifier (ExceptionNotifier::UndefinedNotifierError)


Here are the relevant lines in my config/env/production.rb



#email notifications for exception in app
MyApp::Application.config.middleware.use ExceptionNotification::Rack,
:email => {
:email_prefix => "[Exception] ",
:sender_address => %{"notifier" <notifier@example.com>},
:exception_recipients => %w{email},
},
:slack => {
:webhook_url => "[mySlackHook",
:channel => "#exceptions",
:additional_parameters => {
:icon_url => "error.png"
}
}

Aucun commentaire:

Enregistrer un commentaire