19

I create rails app deployed on Heroku. also, exception_notification gem enabled.

when it is on development setup ActionMailer to Gmail, everything is fine and sends a notification from Gmail address.

but when it comes to production environment on Heroku, I get following error when server trying to send a email.

ActionView::Template::Error (code converter not found (UTF-8 to UTF-16))

Could anyone tell me what's happening here?

Mab879
  • 608
  • 16
  • 33

3 Answers3

20

The issue was raised on the main repository (see here), but so far was not addressed.

You might want to take a look at this fork to the exception_notification gem, specifically this commit which tries to deal with the problem: https://github.com/alanjds/exception_notification/commit/048fc6be972189e62ca3b9453d19233ec5773016

To use this fork I pointed the gem to it, like so:

Gemfile:

gem 'exception_notification', git: 'git://github.com/alanjds/exception_notification.git'

This solved the issue for me.

hananamar
  • 1,166
  • 15
  • 25
  • 4
    This appears to be a problem in 3.0.0, wiring it down to the latest 2.x version, `gem 'exception_notification', '2.6.1'` works as well. – Eric Jan 04 '13 at 20:30
  • Have a look at Marco's newer answer too http://stackoverflow.com/a/16900132/168034 – phunehehe Dec 06 '13 at 09:23
1

Quick adjustment to solution by hananamar, otherwise you'll get an error:

gem 'exception_notification', :git => 'git://github.com/alanjds/exception_notification.git', :require => 'exception_notifier'
user1581404
  • 81
  • 1
  • 3
1

I know this is an old post but since I got the same issue some days ago, I wanted to share here that I solved it by forcing the latest version of the gem on my Heroku app.

gem 'exception_notification', '3.0.1'

I guess the problem was with version 3.0.0 and it is fixed on 3.0.1.

Marco
  • 195
  • 1
  • 14