【问题标题】:Compass watch and .sass-cache指南针手表和 .sass-cache
【发布时间】:2015-11-19 06:12:14
【问题描述】:

(我在 .gitignore 文件中添加了 wp-content/themes/klasik-child/mysass/.sass-cache 行) 当我执行“Compass watch”时出现此错误:

Errno::ENOENT on line ["247"] of C: No such file or directory'
 -C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\github2015\myproject\wp-content\themes\klasik-child\mysass\.sass-cache\75fcaf1b4852ceb732871195e41567cc2a7d8997
C%058C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\github2015
run with --trace to see the full backtrace

然而 75fcaf1b4852ceb732871195e41567cc2a7d8997 和 github2015 文件夹存在。

我重置了我的 .gitingnore 文件并尝试删除文件夹“.sass-cache” 但我仍然有同样的问题。

我尝试在 config.rb 中添加sass_options = {:cache_location => "path\to\tmp\sass-cache"},但它给出了错误"mkdir" invalid argument - path

谢谢!

++ 其他信息:

1- 命令在此处运行:C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\github2015\myproject\wp-content\themes\klasik-child\mysass 来自windows命令

2-目录结构

mysass
|---css
     |----principal.css
|---images
|---sass
     |----partials
           |-----_accueil.scss
     |----pricipal.scss
config.rb

3- config.rb

require 'compass/import-once/activate'

http_path = "/"
css_dir = "css"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
# sass_options = {:cache_location => "path\to\tmp\sass-cache"}
relative_assets = true
line_comments = false

【问题讨论】:

  • 我不明白你是怎么得到这个错误的,你添加了“wp-content/themes/klasik-child/mysass/.sass-cache”到什么?你的 .gitignore 和任何东西都没有关系。
  • 不,我错了,我添加了这一行 wp-content/themes/klasik-child/mysass/.sass-cache。我添加到文件.gitignore。我使用 GitHub。
  • GitHub 与 Sass 或 Compass 无关,而 .gitignore 与 Sass 或 Compass 无关。
  • 好的,所以我不能执行“指南针手表”,忘记.gitignore
  • 您没有在此处提供任何可以帮助任何人重现此错误的内容。没有 config.rb,没有关于目录结构或运行命令的位置的信息。

标签: ruby windows sass compass-sass easyphp


【解决方案1】:

我在这里找到了解决方案:Compass/SASS - not all files are compiled

确实, 仅当我更改 _accueil.scss (PARTIALS) 时才存在问题。 当我更改 pricipal.scss 时没有编译问题。 当我更改类型 I 的 _accueil.scss 错误“没有这样的文件或目录 ...sass-cache/..” -

如果我注释 config.rb # require 'compass/import-once/activate' 的第一行,编译就没有问题了:我所有的样式表都可以正常编译。

【讨论】:

    【解决方案2】:

    我遇到了同样的问题,结果是我的 .sass-cache 路径太长,并且文件静默失败并且没有输出到该目录。它从未在任何地方提到我的路径太长,我正在尝试在这里找到的建议:

    https://github.com/Compass/compass/issues/1791

    要修复它, 将此行添加到您的 config.rb

    cache_path = 'C:\temp\sass'
    

    【讨论】:

      猜你喜欢
      • 2012-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-05
      • 2013-04-12
      • 1970-01-01
      • 2012-12-27
      • 1970-01-01
      相关资源
      最近更新 更多