Forum: Ruby on Rails exception_notification plugin not sending mails in developme

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2b2c2a705ed12f8fb327c7b4c56456c6?d=identicon&s=25 Sean Hussey (seanhussey)
on 2006-05-05 23:01
(Received via mailing list)
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
2b2c2a705ed12f8fb327c7b4c56456c6?d=identicon&s=25 Sean Hussey (seanhussey)
on 2006-05-08 21:24
(Received via mailing list)
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
992fe8c19bbbc27f2b562a9f96efc03d?d=identicon&s=25 Jamis Buck (Guest)
on 2006-05-10 16:56
(Received via mailing list)
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
2b2c2a705ed12f8fb327c7b4c56456c6?d=identicon&s=25 Sean Hussey (seanhussey)
on 2006-05-10 21:16
(Received via mailing list)
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
This topic is locked and can not be replied to.