Exception Notification Gem and Rails 3

后端 未结 17 2068
野趣味
野趣味 2021-01-30 05:16

I\'m trying to get this up and running, but I see \"uninitialized constant ExceptionNotifier\" whenever I start my server.

http://github.com/rails/exception_notificatio

17条回答
  •  醉酒成梦
    2021-01-30 06:07

    till now ( 2012-Aug-03) the official site is : https://github.com/smartinez87/exception_notification, and according the README, it support Rails3 perfectly.

    step1. edit your Gemfile:

    gem 'exception_notification'
    

    step2.

    As of Rails 3 ExceptionNotification is used as a rack middleware, so you can configure its options on your config.ru file, or in the environment you want it to run. In most cases you would want ExceptionNotification to run on production. You can make it work by

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

提交回复
热议问题