I’ve started getting the following error in one of my views for some reason, I don’t get it in development, but only in production.
Here is a snippet of the backtrace, any ideas?
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 %>
After some fiddling, I traced the problem to included javascrips in my view, based on conditionals, which had to manually be listed in rails configuration in order to be put through the asset pipeline.
The relevant info from Rails Guides is:
in
production.rb