-->

Codekit Encoding::CompatibilityError after upgradi

2019-07-21 15:25发布

问题:

So I just upgraded to Mavericks and now one of my Codekit Compass projects isn't compiling properly. I've getting the following error in Codekit (latest version):

Compass was unable to compile one or more files in the project: 

Encoding::CompatibilityError on line ["28"] of /Applications/CodeKit.app/Contents/Resources/engines/scss/lib/sass/tree/visitors/to_css.rb: incompatible character encodings: ASCII-8BIT and UTF-8
Run with --trace to see the full backtrace

(This action was triggered by a change to lks.scss)

Any ideas anyone? Bit stuck.

回答1:

I also saw that issue. Cracking open the file in question and going to line 28, I saw this:

result << child_str + (node.style == :compressed ? '' : "\n")

So it has something to do with reading either your Compass settings or CSS output settings incorrectly after the upgrade. Switch your output settings to uncompressed, save, then switch back and save again and it should autocorrect.



回答2:

Had this problem to. What fixed it for me was editing the config.rb file for the project, and adding this line:

encoding = "utf-8"

Saving, then quitting and restarting CodeKit.



标签: codekit