Sean Hussey
2006-May-05 20:59 UTC
[Rails] exception_notification plugin not sending mails in development on localhost
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
Sean Hussey
2006-May-08 19:18 UTC
[Rails] Re: exception_notification plugin not sending mails in development on localhost
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 On 5/5/06, Sean Hussey <seanhussey@gmail.com> wrote:> 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 >
Jamis Buck
2006-May-10 14:53 UTC
[Rails] Re: exception_notification plugin not sending mails in development on localhost
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 On May 8, 2006, at 1:17 PM, Sean Hussey wrote:> 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 > > On 5/5/06, Sean Hussey <seanhussey@gmail.com> wrote: >> 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 >> > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Sean Hussey
2006-May-10 19:15 UTC
[Rails] Re: exception_notification plugin not sending mails in development on localhost
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
On 5/10/06, Jamis Buck <jamis@37signals.com>
wrote:> 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
>
> On May 8, 2006, at 1:17 PM, Sean Hussey wrote:
>
> > 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
> >
> > On 5/5/06, Sean Hussey <seanhussey@gmail.com> wrote:
> >> 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
> >>
> > _______________________________________________
> > Rails mailing list
> > Rails@lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>