A
A
Andrew2011-06-17 15:05:14
Ruby on Rails
Andrew, 2011-06-17 15:05:14

Rails 3.1. Problem with UTF-8 in sass files?

Many rails are already familiar with the notorious “Invalid US-ASCII character” ruby ​​problem in rb files. It is solved with the help of a magic comment # encoding: utf-8. Sass support has appeared in the new rails, the problem has now been transferred there, but one thing is unclear, where to put the magic comment now? I tried in the scss file, and in the view, and in the controller, and in general, wherever you can put it, and nothing helped.

Invalid US-ASCII character &quot;\xE2&quot;<br/>
 (in .../app/assets/stylesheets/application.css.scss)<br/>
<br/>
Extracted source (around line #5):<br/>
<br/>
5: &lt;%= stylesheet_link_tag &quot;application&quot; %&gt;<br/>
6: &lt;%= javascript_include_tag &quot;application&quot; %&gt;<br/>
7: &lt;%= yield :head %&gt;<br/>
8: &lt;%= csrf_meta_tags %&gt;<br/>

How can this problem be solved?
UPD: it is also worth noting that this problem is observed only in production, and in development everything works fine.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sl_bug, 2011-06-17
@sl_bug

github.com/nex3/haml/issues/269
The solution is described there

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question