exception_notification gem raises ActionView::Template::Error (code converter not found (UTF-8 to UTF-16)) only on Heroku production mode
Asked Answered
A

3

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?

Argyll answered 24/10, 2012 at 2:33 Comment(3)
Same error here. Heroku guys, if you are reading this, please take into account that it is urgent. We have no idea what's happening here.Middleman
Addition: we have resolved the problem by removing Windows line endings from our views.Middleman
Might be a problem with assets not being pre-compiled properly?Molarity
L
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.

Lightning answered 25/10, 2012 at 8:48 Comment(2)
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.Frederigo
Have a look at Marco's newer answer too https://mcmap.net/q/642533/-exception_notification-gem-raises-actionview-template-error-code-converter-not-found-utf-8-to-utf-16-only-on-heroku-production-modeCase
C
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'
Calculated answered 11/2, 2013 at 18:8 Comment(0)
J
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.

Joint answered 3/6, 2013 at 15:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.