Its all about Ruby On Rails
Posts tagged Exception
uninitialized constant ActionMailer::Quoting::Encoding
Apr 13th
Just a quick note, If you are getting “uninitialized constant ActionMailer::Quoting::Encoding” while using ActionMailer, then make sure that your mailer look like:
class Notifier < ActionMailer::Base
def signup_notification(recipient)
recipients recipient.email_address_with_name
bcc ["bcc@example.com"]
from "system@example.com"
subject "New account information"
body :account => recipient
end
end
Actually, yesterday we were getting “uninitialized constant ActionMailer::Quoting::Encoding” while using ActionMailer in production but it was working fine in all modes(development/production) on localhost. Our mailer was like:
class Notifier < ActionMailer::Base
def signup_notification(recipient)
@recipients = recipient.email_address_with_name
@bcc = ["bcc@example.com"]
@from = "system@example.com"
@subject = "New account information"
@body = :account => recipient
end
end
We could not find the actual issue with this mailer. But the above said error was disappeared when we changed the same mailer as following:
class Notifier < ActionMailer::Base
def signup_notification(recipient)
recipients recipient.email_address_with_name
bcc ["bcc@example.com"]
from "system@example.com"
subject "New account information"
body :account => recipient
end
end
Do you guys have any idea? I would love to listen from you.
Update: No its not solved yet. Still same issue. May be some issue with character encoding with the TMail object.
Update 2: This was the issue http://github.com/hmcgowan/roo/issues#issue/4/comment/106328
ActionMailer Error: hostname was not match with the server certificate
Jan 28th
You guys may have stuck with following error while using ActionMailer with Rails 2.2.2 .
OpenSSL::SSL::SSLError (hostname was not match with the server certificate):
/usr/lib/ruby/1.8/openssl/ssl.rb:123:in `post_connection_check'
/usr/lib/ruby/1.8/net/smtp.rb:582:in `tlsconnect'
/usr/lib/ruby/1.8/net/smtp.rb:562:in `do_start'
/usr/lib/ruby/1.8/net/smtp.rb:525:in `start'
/vendor/rails/actionmailer/lib/action_mailer/base.rb:671:in `perform_delivery_smtp'
/vendor/rails/actionmailer/lib/action_mailer/base.rb:526:in `__send__'
/vendor/rails/actionmailer/lib/action_mailer/base.rb:526:in `deliver!'
/vendor/rails/actionmailer/lib/action_mailer/base.rb:392:in `method_missing'
/app/controllers/users_controller.rb:40:in `send_email_to_confirm_user'
If you use postfix, then you fix it quickly by disabling tls by setting “smtpd_use_tls=no” in /etc/postfix/main.cf .
Remember to restart postfix and rails app server.
Exceptional: Another rails application exception tracking application
Oct 24th
Some days ago I found HopToad, as a subtitute of exception notifier plugin. Now, today I found another rails exception tracking application named Exceptional. Hoptoad is free while exceptional is paid.
Hoptoad: A Rails Exception Handling Service
Aug 12th
Many of you guys(as me) may have used Exception Notifier plugin to get Rails app exceptions right into your mailbox, and may also have faced some problem like this.
Also if you have 2-3 or more apps running in production then managing such exception mails is also a big headache. In such case one have to keep track of many things like which type of error is resolved/unresolved for which project etc… .
So, here is a good news for those who don’t know about Hoptoad. It is an hosted service by thoughtbot which receives your exceptions, notify you once per error type by email and keep track(resolved/unresolved, count etc…) of your errors on project basis.
By now its a free service. I’m gonna use this as my next project goes live. What abt you??? ;-P