我有一个使用 Ruby 1.9.3 的 Rails 3.2.8 应用程序。我正在尝试将松弛集成配置为与 execption_notification 一起使用。execption_notification 适用于邮件,但在根据自述文件 HERE 添加松弛集成后,我在尝试启动服务器时收到此错误...
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)
这是我的 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"
}
}