I installed the exception notifier via: /script/plugin install -x exception_notification It resides in the vendor/exception_notification directory (as advertised). I''ve configured environment.rb with the following: ExceptionNotifier.exception_recipients = %w(blakemiller-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org) ExceptionNotifier.sender_address = %("Application Error" <blakemiller-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org>) Note: the documentation didn''t say *where* in environment.rb to put it, so I put it outside of any functions. Rails is configured (through environment.rb) as: RAILS_GEM_VERSION = ''1.1.2'' In my application controller, I have: include ExceptionNotifiable ...as the documentation says The problem: I get nothing. No emails, no pretty error page, just the standard error template that I always get when there is an error. I''ve restarted the server countless times to no avail, and to short-circuit the fact that I''m running the server and making page requests locally, I commented out the code in ExceptionNotifiable as such: def local_request? # remote = IPAddr.new(request.remote_ip) # !self.class.local_addresses.detect { |addr| addr.include?(remote) }.nil? false end ...and I''ve also tried: def local_addresses ''addresses = read_inheritable_attribute(:local_addresses) unless addresses addresses = [IPAddr.new("127.0.0.1")] write_inheritable_attribute(:local_addresses, addresses) end addresses'' nil end The README says to override the does-not-work-locally by putting "local_addresses.clear" somewhere in your controller. I tried putting it in a before_filter function and I get errors that "local_addresses" could not be found. I attempted to prefix it with ExceptionNotifier::ClassMethods::local_addresses.clear to no avail. So I resorted to commenting out the functions in ExceptionNotifier as described previously, and still nothing. Any ideas why it''s not working? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You''ll have to tell ActionMailer how to send the email still. http://wiki.rubyonrails.com/rails/pages/HowToSendEmailsWithActionMailer That should clear everything up. Well, once you get ActionMailer up and working. RSL On 1/6/07, Blake Miller <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I installed the exception notifier via: > /script/plugin install -x exception_notification > > It resides in the vendor/exception_notification directory (as > advertised). I''ve configured environment.rb with the following: > > ExceptionNotifier.exception_recipients = %w(blakemiller-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org) > ExceptionNotifier.sender_address = %("Application Error" > <blakemiller-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org>) > > Note: the documentation didn''t say *where* in environment.rb to put it, > so I put it outside of any functions. > > Rails is configured (through environment.rb) as: > RAILS_GEM_VERSION = ''1.1.2'' > > In my application controller, I have: > include ExceptionNotifiable > ...as the documentation says > > The problem: I get nothing. No emails, no pretty error page, just the > standard error template that I always get when there is an error. > > I''ve restarted the server countless times to no avail, and to > short-circuit the fact that I''m running the server and making page > requests locally, I commented out the code in ExceptionNotifiable as > such: > def local_request? > # remote = IPAddr.new(request.remote_ip) > # !self.class.local_addresses.detect { |addr| addr.include?(remote) > }.nil? > false > end > > ...and I''ve also tried: > def local_addresses > ''addresses = read_inheritable_attribute(:local_addresses) > unless addresses > addresses = [IPAddr.new("127.0.0.1")] > write_inheritable_attribute(:local_addresses, addresses) > end > addresses'' > nil > end > > The README says to override the does-not-work-locally by putting > "local_addresses.clear" somewhere in your controller. I tried putting > it in a before_filter function and I get errors that "local_addresses" > could not be found. I attempted to prefix it with > ExceptionNotifier::ClassMethods::local_addresses.clear to no avail. So > I resorted to commenting out the functions in ExceptionNotifier as > described previously, and still nothing. > > Any ideas why it''s not working? > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I already have ActionMailer configured to send emails, and it''s sending mail for other parts of the application. I''m not sure if there is some specific configuration for the exception notifier or not? Russell Norris wrote:> You''ll have to tell ActionMailer how to send the email still. > http://wiki.rubyonrails.com/rails/pages/HowToSendEmailsWithActionMailer > > That should clear everything up. Well, once you get ActionMailer up and > working. > > RSL-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Does your config/environment.rb contain a section similar to the following? # Error reports for your site will be sent to all email addresses in the %w{} array. ExceptionNotifier.exception_recipients = %w( user-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org) # Sender address should be different from all recipient since some mail servers # have problems when both are the same. Spam-guard related I''m sure. ExceptionNotifier.sender_address = %w( other-user-9IKiO1iGCm/QT0dZR+AlfA@public.gmane.org) Note that the sender and recipients should be different addresses. This may [or may not] be part of the problem too. Hope this helps. RSL On 1/7/07, Blake Miller <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I already have ActionMailer configured to send emails, and it''s sending > mail for other parts of the application. I''m not sure if there is some > specific configuration for the exception notifier or not? > > Russell Norris wrote: > > You''ll have to tell ActionMailer how to send the email still. > > http://wiki.rubyonrails.com/rails/pages/HowToSendEmailsWithActionMailer > > > > That should clear everything up. Well, once you get ActionMailer up and > > working. > > > > RSL > > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Yes, as follows, notice I have the email outside of any function (I think this is ok?) Note: I''ve substituted dummy email addresses: Rails::Initializer.run do |config| end ExceptionNotifier.exception_recipients = %w(myemailishere-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org) ExceptionNotifier.sender_address = %w("Application Error" <anotheruser-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org>) Russell Norris wrote:> Does your config/environment.rb contain a section similar to the > following? > RSL-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I think the problem is that space between "Application Error" and the email address. the %w method sees two entries there, the first of which is not a valid email address and might be causing further failures. You might try ExceptionNotifier.sender_address = ["Application Error < anotheruser-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org>"] or just leaving out that "Application Error" part. The email''s subject makes it clear that it''s an error. Lemme know if that works. RSL On 1/8/07, Blake Miller <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > Yes, as follows, notice I have the email outside of any function (I > think this is ok?) Note: I''ve substituted dummy email addresses: > > Rails::Initializer.run do |config| > end > > ExceptionNotifier.exception_recipients = %w(myemailishere-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org) > ExceptionNotifier.sender_address = %w("Application Error" > <anotheruser-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org>) > > Russell Norris wrote: > > Does your config/environment.rb contain a section similar to the > > following? > > RSL > > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Russell Norris wrote:> I think the problem is that space between "Application Error" and the > email > address. the %w method sees two entries there, the first of which is not > a > valid email address and might be causing further failures. You might try > > ExceptionNotifier.sender_address = ["Application Error < > anotheruser-uBzjpPW2m0pBDgjK7y7TUQ@public.gmane.org>"] > > or just leaving out that "Application Error" part. The email''s subject > makes > it clear that it''s an error. Lemme know if that works. > > RSLWell, I fixed it. The notifier doesn''t work in development mode. When I changed to production mode it worked. Thanks for the help. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Maybe Matching Threads
- NameError when running exception_notification plugin?
- exception_notification plugin not sending mails in development on localhost
- Exception Notification plugin options hash handling????? backwards merge?
- Ruby 1.8.6 + Rails 1.2.3 + ErrorNotification == NameError !?
- Action Mailer throwing underscores on template name