# Exception\_notification plugin not sending mails in developme

**URL:** <https://www.ruby-forum.com/t/exception-notification-plugin-not-sending-mails-in-developme/94530>\
**Category:** Rails\
**Created:** [May 5, 2006, 11:01pm UTC](https://www.ruby-forum.com/t/exception-notification-plugin-not-sending-mails-in-developme/94530 "2006-05-05T23:01:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanhussey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Post date:** [May 5, 2006, 11:01pm UTC](https://www.ruby-forum.com/t/exception-notification-plugin-not-sending-mails-in-developme/94530/1 "2006-05-05T23:01:34Z")

</div>

Hi everyone,

So, I’ve got exception\_notification working now, but not in  
development mode on localhost. In my ApplicationController, I’ve  
added:

local\_addresses.clear

Shouldn’t that be enough?

Thank you!

Sean

---

<div class="post-metadata">

**Author:** ![seanhussey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Post date:** [May 8, 2006, 9:24pm UTC](https://www.ruby-forum.com/t/exception-notification-plugin-not-sending-mails-in-developme/94530/2 "2006-05-08T21:24:03Z")

</div>

Another update–I really can’t get it to send exceptions at all, and  
I’m not sure why. For instance, I’m forcing a LDAP::ResultError  
exception, but no mail is sent. I’ve even cleared out the addresses  
array in local\_addresses.

What I’d like to do is to use exception\_notification within a rescue  
clause. For instance:

begin

# some stuff ehre

rescue Exception =\> ex

# Send an email

# Other operations to handle the rescue.

end

Am I barking up the wrong tree with this plugin?

Thanks!

Sean

---

<div class="post-metadata">

**Author:** ![seanhussey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Post date:** [May 10, 2006, 4:56pm UTC](https://www.ruby-forum.com/t/exception-notification-plugin-not-sending-mails-in-developme/94530/3 "2006-05-10T16:56:20Z")

</div>

To send exception emails in dev mode, you need to be sure and change  
the following line in config/environments/development.rb:

config.action\_controller.consider\_all\_requests\_local = true

Set that value to false. Otherwise, regardless of how you set  
local\_addresses, all requests are considered local.

Hope that helps,

Jamis

---

<div class="post-metadata">

**Author:** ![seanhussey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Post date:** [May 10, 2006, 9:16pm UTC](https://www.ruby-forum.com/t/exception-notification-plugin-not-sending-mails-in-developme/94530/4 "2006-05-10T21:16:18Z")

</div>

It certainly does! Thank you!

Now, when I hit other types of exceptions (in one case, an LDAP  
exception), I get this error:

NameError

uninitialized constant ExceptionNotifiable  
RAILS\_ROOT: /Users/sean/Projects/Rails/MagicHat/public/…/config/…

Application Trace | Framework Trace | Full Trace  
/Applications/Locomotive2/Bundles/rails112.locobundle/powerpc/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:123:in  
`const_missing' /Applications/Locomotive2/Bundles/rails112.locobundle/powerpc/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in`const\_missing’  
/Applications/Locomotive2/Bundles/rails112.locobundle/powerpc/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active\_support/dependencies.rb:133:in  
`const\_missing’  
#{RAILS\_ROOT}/app/controllers/application.rb:4  
This error occured while loading the following files:  
application.rb  
exception\_notifiable.rb

Thoughts on that one? Does this handle non-Rails exceptions? I have  
“include ExceptionNotifiable” in my application.rb.

Thanks!

Sean
