UTF-8/ASCII encoding problem under NGINX/Passenger
corporealfunk opened this issue · 1 comments
corporealfunk commented
Odd that this happens only when running ABBA as a rack app under NGINX/Passenger, but when I do, I get this error message:
Error compiling CSS asset
Encoding::InvalidByteSequenceError: "\xE2" on US-ASCII
(in /var/code/abba/app/assets/stylesheets/experiment.css.styl)
(/var/code/abba/vendor/bundle/ruby/1.9.1/gems/execjs-1.4.0/lib/execjs/external_runtime.rb:173:in `read'
I understand that issue may be more appropriately answered in the ExecJS or the Stylus project, maybe even Passenger! I'm not sure exactly which of these projects this is best addressed in.
This doesn't happen when running under thin.
However, by adding this line at the top of the config.ru
file, the issue is solved for me given my preferred deployment setup:
Encoding.default_external = 'UTF-8'
Thought I'd open this issue in part to see if others have this problem.
corporealfunk commented
(also understand this probably moot when pre-compiling assets...)