【问题标题】:exception-notification gem "ERROR: Failed to generate exception summary"异常通知 gem “错误:无法生成异常摘要”
【发布时间】:2012-08-21 00:58:20
【问题描述】:

使用exception-notification gem 已经有一段时间了,现在相当成功,但是在实际错误之后,每个电子邮件正文顶部的电子邮件条目让我很恼火。问题文字是:

-------------------------------
Request:
-------------------------------

 ERROR: Failed to generate exception summary:

 ActionView::Template::Error: Missing rack.input

接下来的几行甚至总是相同的。这说明什么?如何解决此问题,以便在任何有意义的内容上升到堆栈跟踪顶部之前不再看到此错误?

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-3 exception-handling gem


    【解决方案1】:

    这意味着 ExceptionNotifier 在生成this file 时遇到了问题。这通常发生在您自定义发送给它的数据时。您能否将中间件配置* 添加到问题中,以便我们查看是否是问题所在?此外,您能否确认您使用的是什么版本的 Rails 和异常通知,以及您是否在请求环境中设置任何自定义数据**?

    * 应该是这样的

    Whatever::Application.config.middleware.use ExceptionNotifier,
      :email_prefix => "[Whatever] ",
      :sender_address => %{"notifier" <notifier@example.com>},
      :exception_recipients => %w{exceptions@example.com}
    

    ** 前过滤器中的类似内容

    request.env["exception_notifier.exception_data"] = { ... }
    

    【讨论】:

      猜你喜欢
      • 2013-01-31
      • 2021-06-25
      • 2017-12-12
      • 2016-09-11
      • 2013-05-03
      • 2010-12-21
      • 2015-07-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多