【问题标题】:Errno::ENOENT on line ["346"] of C: No such file or directory -Errno::ENOENT on line ["346"] of C: 没有这样的文件或目录 -
【发布时间】:2014-10-16 12:42:05
【问题描述】:

我正在使用 Sass、Compass、Guard 和 Bundler。当我在主题根目录的命令行上使用 config.rb gemfile 和 guardfile 执行 bundle exec guard 时,它给了我这个输出,但它不会编译我的 sass 文件:

C:\wamp\www\fitzindustries\sites\all\themes\fitzindustries>bundle exec guard
Errno::ENOENT on line ["346"] of C: No such file or directory - C:/wamp/www/fitz
industries/sites/all/themes/fitzindustries/.sass-cache/75fcaf1b4852ceb732871195e
41567cc2a7d8997/C%058%092Ruby193%092lib%092ruby%092gems%0921.9.1%092gems%092comp
ass-core-1.0.0%092stylesheets%092compass%092utilities%092general%092_hacks.scssc
20140822-1732-lofyx5.lock
Run with --trace to see the full backtrace

17:30:22 - INFO - Guard is using TerminalTitle to send notifications.
17:30:22 - INFO - LiveReload is waiting for a browser to connect.
17:30:23 - INFO - Guard::Compass is waiting to compile your stylesheets.
17:30:23 - INFO - Guard is now watching at 'C:/wamp/www/fitzindustries/sites/all
/themes/fitzindustries'

.sass-cache 文件夹似乎有问题。我曾尝试更改此文件夹的权限并删除该文件夹,但没有帮助。 我该如何解决这个错误?

【问题讨论】:

  • 您的 config.rb 文件是否指向您实际的 Sass 和 CSS 目录?你用的是什么版本的 Sass?什么版本的指南针?
  • @KatieK compass 1.0.1 sass 3.4.1 # 主题资源的位置。 http_path = "/" css_dir = "styles/css" sass_dir = "styles/sass" images_dir = "images" fonts_dir = "fonts" javascripts_dir = "js" 我所有的文件夹都在主题根目录中,除了 css 和 sass 文件夹在样式中,例如 (root/)styles/css & (root/)styles/sass

标签: ruby drupal sass bundler guard


【解决方案1】:

我们在 Windows 机器上遇到了同样的问题,最终将以下内容添加到 config.rb 文件中,这使问题消失了:

sass_options = {:cache_location => "path\to\tmp\sass-cache"}

我们没有很多要编译的 Sass 文件,因此为我们关闭该缓存不会出现速度问题,但您的里程可能会有所不同!

【讨论】:

    猜你喜欢
    • 2020-02-22
    • 2015-06-12
    • 1970-01-01
    • 1970-01-01
    • 2014-07-09
    • 2013-02-01
    • 2018-05-01
    • 2014-10-23
    • 1970-01-01
    相关资源
    最近更新 更多