Trevor Turk
2008-Jun-04 21:49 UTC
Exception Notification plugin not working with Rails 2.1?
We seemed to stop getting exception notifications in an app that''s using Rails 2.1 recently, and I did some digging to try and figure out what the problem was. I think I''m onto the issue, but it would appear that my Ruby-fu is still too weak to find a solution just yet. Here''s a failing test with the plugin in a fresh Rails 2.1 app: http://pastie.org/208968 I think it may be related to this commit, but I''m not sure: http://github.com/rails/rails/commit/8d37bd08eeac6d0e94f76ac6640e288bf64595b2 Thanks to github for the awesome search feature :) http://github.com/rails/rails/search?q=filter_parameters&choice=grep I think that making filter_parameters protected caused the issue somewhere around here: http://github.com/rails/exception_notification/tree/master/lib/exception_notifier_helper.rb#L64 That might be causing this test to fail: http://github.com/rails/exception_notification/tree/master/test/exception_notifier_helper_test.rb#L46 Any help would be appreciated! Thanks, - Trevor --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Michael Koziarski
2008-Jun-04 23:32 UTC
Re: Exception Notification plugin not working with Rails 2.1?
> Any help would be appreciated!If it''s just about making the method protected you should be able to change: @controller.filter_parameters(parameters) to @controller.send(:filter_parameters, parameters) -- Cheers Koz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Trevor Turk
2008-Jun-05 17:44 UTC
Re: Exception Notification plugin not working with Rails 2.1?
On Jun 4, 6:32 pm, "Michael Koziarski" <mich...@koziarski.com> wrote:> If it''s just about making the method protected you should be able to change: > @controller.filter_parameters(parameters) > to > @controller.send(:filter_parameters, parameters)Thanks for your reply, Koz. This strategy you suggested appears to fix the issue of the plugin not sending emails when exceptions are raised in an app using Rails 2.1: http://github.com/trevorturk/exception_notification/commit/9b3b0eca97ca27af6844ffc81ee6190ce022b364 Perhaps someone with commit access to the Rails github would consider making this change in the official plugin? Here is a ticket about the issue of the plugin not being compatible with Rails 2.1: http://rails.lighthouseapp.com/projects/8995/tickets/15-rails-2-1-0-filter_parameter_logging-crashes-exception_notifiable Here is a ticket about the (separate?) issue of the (still) failing test: http://rails.lighthouseapp.com/projects/8995/tickets/11-exception_notifiable-test-failure ==Just to be clear for others that may be impacted by this issue: the exception_notification plugin does not appear to work with Rails 2.1 applications! == Thanks again, - Trevor --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
I''m just chiming in to confirm this bug and the suggested fix -- but shouldn''t this be tracked as an exception_notifier bug, not a rails bug? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
Yong Bakos
2008-Jul-02 23:07 UTC
Re: Exception Notification plugin not working with Rails 2.1?
After the above mentioned fix you may find another error. Also fixed similarly as above, this time on exception_notifier_helper line 76: From: return @controller.filter_parameters({env_key => env_value}).values[0] To: return @controller.send(:filter_parameters, {env_key => env_value}).values[0] I''ve added this info to the lighthouse ticket: http://rails.lighthouseapp.com/projects/8995-rails-plugins/tickets/15 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---