异常通知 Gem 和 Rails 3

2024-04-09

我正在尝试启动并运行它,但每当启动服务器时我都会看到“未初始化的常量 ExceptionNotifier”。

http://github.com/rails/exception_notification http://github.com/rails/exception_notification

在我的 Gemfile 中我有

gem“异常通知”,:git =>“http://github.com/rails/exception_notification.git http://github.com/rails/exception_notification.git“,:分支=>“主”

我尝试将 github 自述文件中所示的配置放入 config/application.rb、config/environment.rb 和 config.ru 中。我用我的应用程序名称替换了“Whatever”。


以前的所有答案都已过时,您现在只需将其添加到您的 gemfile 中即可:

gem 'exception_notification', :require => 'exception_notifier'

并按照自述文件中的指示编辑 Production.rb 配置文件:

config.middleware.use ExceptionNotifier,
  :email_prefix => "[Exception] ",
  :sender_address => %{"Exception Notifier" <support@example.com>},
  :exception_recipients => %w{[email protected] /cdn-cgi/l/email-protection}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

异常通知 Gem 和 Rails 3 的相关文章

随机推荐