2013-02-01 82 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

相关问题