出于某种原因,我的一个视图中开始出现以下错误,我没有在开发中得到它,而只是在生产中得到它。
这是回溯的片段,有什么想法吗?
ActionView::Template::Error (code converter not found (UTF-8 to UTF-16)):
19: [title, summary.gsub(/^/, " "), nil].join("\n\n")
20: end
21: end.join
22: sections = sections.force_encoding('UTF-8').encode('UTF-16', :invalid => :replace).encode('UTF-8') if sections.respond_to?(:force_encoding)
23: %>
24:
25: <%= raw sections %>