Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7893669
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:11:31+00:00 2026-06-03T07:11:31+00:00

I use Exception Notifier for handling errors in my app and in /config/initializers/exception_notification.rb I

  • 0

I use Exception Notifier for handling errors in my app and in /config/initializers/exception_notification.rb I have followings:

MyAPP::Application.config.middleware.use ExceptionNotifier,
  :email_prefix => "[ERROR] ",
  :sender_address => '"Notifier" <notifier@yourdomain.com>',
  :exception_recipients => ['account@gmail.com']

But the notification email is sent also in development mode, how can I allow sending email only in production mode?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:11:32+00:00Added an answer on June 3, 2026 at 7:11 am

    You can configure the ExceptionNotifier separately for each environment. See also the documentation.

    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.

    So you just configure it in your config/environments/production.rb with e.g.

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

    There is also a nice blog entry handling this topic.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I use exception handling in Rails? Currently I have done following. In
I want to use custom exception handling, for example instead of using (Exception ex)
I am trying to use nunits new way of exception handling but I am
Is it a bad idea to use exception chaining when throwing RemoteExceptions? We have
One can use notifier for parsed options only if they have value_semantic. What is
There have been posts about how to use exception breakpoint in Xcode. But my
I am using ErrorException as my central error handling function for Errors and Exception:
What is better to use for Exception output message dynamic generation String or StringBuilder
When I use boost::copy_exception to copy an exception to an exception_ptr , I lose
I am getting the following exception when i try to use the fetchall method

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.