0

我正在编辑一个使用 SASS 的 wordpress 模板。当我编辑 .scss 文件并保存它时,CodeKit 会抛出此错误。

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

error app.scss (Line 9 of _settings.scss: File to import not found or unreadable: foundation/functions.
Load paths:
  /Library/WebServer/Documents/dev/ecpr_sgoc/scss
  /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/frameworks/blueprint/stylesheets
  /Library/Ruby/Gems/2.0.0/gems/compass-0.12.2/frameworks/compass/stylesheets
  /Applications/CodeKit.app/Contents/Resources/engines/bourbon/bourbon/app/assets/stylesheets
  /Applications/CodeKit.app/Contents/Resources/engines/neat
  /Applications/CodeKit.app/Contents/Resources/engines/susy/sass
  Compass::SpriteImporter)
identical app.css 


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

编辑:我刚刚升级到 CodeKit 2,这是新的输出:

Compass failed to run because your Mac has an older version of Sass and/or Compass
installed that conflicts with the newer versions in CodeKit. You must remove all
versions of Sass below 3.3.rc6 and all versions of Compass below 1.0.alpha18.
Do this at the command line by running 'sudo gem uninstall sass'
and 'sudo gem uninstall compass'.

但是我安装了 Sass 3.3.4 和 Compass 0.12.5(AFAIK,比提到的 1.0.alpha18 更新)...

4

1 回答 1

0

你只需要像这样删除任何旧版本的 sass 和 compass :

sudo gem 卸载 sass,sudo gem 卸载指南针

前任:

$ sudo gem uninstall sass

Select gem to uninstall:
 1. sass-3.2.19
 2. sass-3.3.5
 3. All versions

并且只保留最新版本的 sass 和 compass 和 codekit 会像魅力一样工作:)

我用这个解决了我的问题

于 2014-04-20T10:48:15.793 回答