The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Exception Notifier Plugin Fix for Rails 2.2.2+

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Vincent Woo

Posts: 30
Nickname: vwoo
Registered: Sep, 2008

Vincent Woo is a Ruby on Rails enthusiast.
Exception Notifier Plugin Fix for Rails 2.2.2+ Posted: Mar 24, 2009 4:39 AM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Vincent Woo.
Original Post: Exception Notifier Plugin Fix for Rails 2.2.2+
Feed Title: Undefined Range
Feed URL: http://www.undefinedrange.com/categories/ruby-on-rails.rss
Feed Description: Interesting things I experience with Ruby on Rails.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Vincent Woo
Latest Posts From Undefined Range

Advertisement

For those of us who are still using the Exception Notifier Plugin, be careful when upgrading to a recent version of Rails. Doing so with Rails 2.2.2+ and the configuration is in an environment file (#{RAILS_ROOT}/config/environments/production.rb for instance) will not send notification emails. Instead, it’ll fail with:

Net::SMTPSyntaxError (501 5.1.3 Bad recipient address syntax
):
  /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/net/smtp.rb:679:in `check_response'
  /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/net/smtp.rb:652:in `getok'
  /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/net/smtp.rb:634:in `rcptto'
  /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/net/smtp.rb:545:in `send0'
  /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/net/smtp.rb:544:in `each'
  /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/net/smtp.rb:544:in `send0'
  /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/net/smtp.rb:471:in `sendmail'
  /opt/ruby-enterprise-1.8.6-20090113/lib/ruby/1.8/net/smtp.rb:378:in `start'

Several ways to work around this problem. You could wrap the configuration inside an after_initialize block:

config.after_initialize do
  ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bill@schmoe.com)
  ExceptionNotifier.sender_address = %("App Error" )
  ExceptionNotifier.email_prefix = "[APP] " 
end

The other solution is to put the configuration in an initializer file.

Of course, there is the option to instead use Hoptoad or Exceptional.

There is a lighthouse ticket if you want to follow the discussion.

Read: Exception Notifier Plugin Fix for Rails 2.2.2+

Topic: Easy Charging of Credit Cards with Spreedly Previous Topic   Next Topic Topic: Skype for SIP == Skype for Asterisk DOA?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use