【问题标题】:How to get Hoptoad or Airbrake Error Notification in Development Environment on Rails如何在 Rails 开发环境中获取 Hoptoad 或 Airbrake 错误通知
【发布时间】:2010-08-26 07:29:46
【问题描述】:

请任何人帮忙解决,如何在 Rails 开发环境中获取 hoptoad/airbrake 错误通知,

我已经正确配置了airbrake,甚至我也从airbrake收到了测试邮件,即通过运行rake hoptoad:testrake airbrake:test

但除此之外,我什么也没得到,即错误、期望等。

请帮我解决这个问题。

谢谢

【问题讨论】:

    标签: ruby-on-rails error-handling ruby-on-rails-plugins hoptoad


    【解决方案1】:

    我认为这里的答案应该是从您的配置中获取“开发”。在初始化程序中尝试以下行:

    HoptoadNotifier.configuration.development_environments = ['cucumber', 'test']
    

    Airbrake.configure do |config|
      config.development_environments = %w(cucumber test)
    end
    

    【讨论】:

      【解决方案2】:

      将以下内容添加到您的config/environments/development.rb

      config.action_controller.consider_all_requests_local = false
      

      并通过您的非环回 IP(不是 http://localhost:3000/http://127.0.0.1:3000/)访问您的应用程序,例如http://192.168.1.3:3000/(在您的网络设置中查找正确的 IP)。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-11-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-11-25
        • 2015-06-29
        • 2014-05-13
        • 2012-09-22
        相关资源
        最近更新 更多