2013-02-01 38 views

回答

1

您可能還沒有在初始化程序中配置該gem。在我通知我的異常的控制器動作,我有以下

ExceptionNotifier::Notifier.exception_notification(
    request.env, 
    env["action_dispatch.exception"] 
).deliver 

我已經中config/initializers/exception_notifier.rb

if Rails.env.production? 
    MyApp::Application.config.middleware.use ExceptionNotifier, 
    email_prefix:   "[#{App.domain.pretty}] ", 
    sender_address:  App.email.noreply, 
    exception_recipients: App.email.exceptions, 
    ignore_exceptions: ExceptionNotifier.default_ignore_exceptions, 
    normalize_subject: true 
end 

MyAppApp.____都應該通過自己的值替換以下。

+0

你在哪裏設置了'App.domain' – Rpant

相關問題