【问题标题】:Compass unable to find files in project指南针无法在项目中找到文件
【发布时间】:2014-05-18 17:23:29
【问题描述】:

我正在编辑一个使用 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 更新)...

【问题讨论】:

  • 我对 CodeKit 没有任何经验。您是否为项目安装了所有必需的 gem(例如蓝图)。您是否检查了错误报告中提到的路径中是否存在所有文件(并且 CodeKit 可读)?
  • 是的,我查过了,但是 Compass 找不到的所有文件夹实际上都在那里......
  • 好的。我不知道它在 Mac 上如何,但在 Linux 上,您还必须确保运行 CodeKit 的用户能够读取文件和文件夹。如果这也适用于 Mac,请检查权限。
  • 我升级到 CodeKit 2 但仍然没有解决方案。我用新的错误文本编辑了开头的帖子。

标签: rubygems sass compass-sass codekit


【解决方案1】:

你只需要像这样删除任何旧版本的 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 会像魅力一样工作 :)

我用这个解决了我的问题

【讨论】:

    猜你喜欢
    • 2016-12-10
    • 1970-01-01
    • 2013-03-08
    • 1970-01-01
    • 2013-03-13
    • 2013-09-10
    • 1970-01-01
    • 1970-01-01
    • 2016-09-06
    相关资源
    最近更新 更多