我正在使用ExceptionNotification。发生错误时,异常通知用于向我发送电子邮件,但现在没有。

发生错误且异常通知者想发送时,出现以下错误:

W, [2015-04-21T15:19:14.464284 #98174]  WARN -- : An error occurred when sending a notification using 'email' notifier. NoMethodError: private method `include' called for #<Class:0x007fe291e11ad8>
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/actionmailer-4.0.8/lib/action_mailer/base.rb:482:in `method_missing'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier/email_notifier.rb:20:in `block in extended'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier/email_notifier.rb:19:in `class_eval'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier/email_notifier.rb:19:in `extended'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier/email_notifier.rb:137:in `extend'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier/email_notifier.rb:137:in `block in mailer'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier/email_notifier.rb:136:in `tap'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier/email_notifier.rb:136:in `mailer'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier/email_notifier.rb:157:in `create_email'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier/email_notifier.rb:143:in `call'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier.rb:94:in `fire_notification'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier.rb:39:in `block in notify_exception'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier.rb:38:in `each'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notifier.rb:38:in `notify_exception'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notification/rack.rb:42:in `rescue in call'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/exception_notification-4.1.0/lib/exception_notification/rack.rb:32:in `call'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/warden-1.2.3/lib/warden/manager.rb:35:in `block in call'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `catch'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/warden-1.2.3/lib/warden/manager.rb:34:in `call'
/Users/Will/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/newrelic_rpm-3.11.2.286/lib/new_relic/agent/instrumentation/middleware_tracing.rb:67:in `call'

等等。

我该如何调试?

最佳答案

检查GitHub issues for the project中的错误报告。看起来在4.1.0上出现了an open issue about your problem。尝试降级到4.0.1。

关于ruby-on-rails - 异常通知未发送,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/29775140/

10-10 03:26