exception_notification gem仅在Heroku生产模式下引发了ActionView :: Template :: Error(未找到代码转换器(UTF-8到UTF-16)) [英] exception_notification gem raises ActionView::Template::Error (code converter not found (UTF-8 to UTF-16)) only on Heroku production mode

查看:164
本文介绍了exception_notification gem仅在Heroku生产模式下引发了ActionView :: Template :: Error(未找到代码转换器(UTF-8到UTF-16))的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Heroku上部署了Rails应用程序。
也是, exception_notification 启用了gem。



当开发者设置ActionMailer为Gmail时,
的一切都很好,并发送来自Gmail地址的通知。



但是当涉及Heroku上的生产环境时,
服务器尝试发送一封电子邮件。



ActionView :: Template :: Error(找不到代码转换器(UTF-8到UTF-16))

任何人都可以告诉我这里发生了什么?

解决方案

主要存储库引发了这个问题(请参阅此处),但目前尚未解决。



你可能想看看这个fork到exception_notification gem,特别是这个尝试处理这个问题的提交:
https ://github.com/alanjds/exception_notification/commit/048fc6be972189e62ca3b9453d19233ec5773016



为了使用这个分支,我把它指向它,像这样:



Gemfile:

  gem'exception_notification',git:'git:// 


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?

解决方案

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.

这篇关于exception_notification gem仅在Heroku生产模式下引发了ActionView :: Template :: Error(未找到代码转换器(UTF-8到UTF-16))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆