Sprockets encoding error on js file: invalid UTF-8 byte sequence

烈酒焚心 提交于 2019-11-30 08:27:16

I found the solution via the comments on this Sprockets issue:

I simply saved the file as utf-8, (TextMate has an option to do this when you chose 'Save As'), and the problem went away.

The commenter @shedd also created a useful rake task to find assets which are not encoded properly.

This is fixed in trunk. All files use utf-8 without BOM.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!