私はexception_notificationgemをアプリに追加したいのですが、これは手動でメールをトリガーしようとすると発生します。
exception
# => #<ZeroDivisionError: divided by 0>
ExceptionNotifier::Notifier.exception_notification(request.env, exception)
# => #<ActionMailer::Base::NullMail:0x007fa81bc7c610>
ExceptionNotifier::Notifier.background_exception_notification(exception)
# => #<ActionMailer::Base::NullMail:0x007fa81bf58190>
上記の例では、コンソールは、あるコントローラーrescue_from Exception
で意図的に実行された後、ApplicationController内のブレークポイントにあります。1/0
私もdelayed_jobを使用していますが、当然のことながら、ExceptionNotifier::Notifier.background_exception_notification(exception).deliver
何もスプールしません。
私はすでにconfig.consider_all_requests_local = false
開発を開始しましたが、それでもexception_notificationはNullMailをインスタンス化します。アプリの他の部分では、メーラーは問題なく機能し、を使用しますsendmail
。
私がここで間違っていることについて何か考えはありますか?ご協力いただきありがとうございます!