Codekit Encoding::CompatibilityError after upgradi

2019-07-21 14:48发布

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.

标签: codekit
2条回答
叼着烟拽天下
2楼-- · 2019-07-21 15:19

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.

查看更多
Lonely孤独者°
3楼-- · 2019-07-21 15:33

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.

查看更多
登录 后发表回答