【发布时间】:2013-03-31 03:45:41
【问题描述】:
我在将 guard 和 guard-sass 编译到我的 .sass 文件时遇到问题。我已经安装了它们,将guard-sass 配置指向了我的输入和输出目录,但是每当我保存更改时,.css 文件都不会更新。
最初我认为这可能是权限问题,但奇怪的是我已经设置了 :all_on_start => true 哪些单词所以我怀疑它可能是这样的。
这是我的 GuardFile:
guard 'sass',
:input => 'assets/sass',
:output => 'static/css',
:all_on_start => true
我也尝试过(只是避免使用长符号会有所不同):
guard 'sass',
:all_on_start => true,
:output => 'static/css' do
watch %r{^assets/sass/(.+\.s[ac]ss)$}
end
这是我用调试启动 Guard(guard start -d - 以防调试显示我缺少的东西):
tavocado:data tavocado$ guard start -d
22:39:49 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
22:39:49 - INFO - Guard uses TerminalTitle to send notifications.
22:39:49 - DEBUG - Command execution: hash stty
22:39:49 - DEBUG - Guard starts all plugins
22:39:49 - DEBUG - Hook :start_begin executed for Guard::Sass
22:39:49 - INFO - Sass [0.02s] base.sass -> base.css
22:39:49 - DEBUG - Hook :start_end executed for Guard::Sass
22:39:49 - INFO - Guard is now watching at '/data'
22:39:50 - DEBUG - Command execution: stty -g 2>/dev/null
22:39:50 - DEBUG - Start interactor
我在 OS X 10.8.3 上使用默认的 ruby 安装(ruby 1.8.7,gem 1.3.6)安装它。
我已经做了几个小时了,我完全被难住了,所以任何帮助都将不胜感激。
【问题讨论】:
-
我在使用 ROR 5.1.5 时遇到了同样的问题。我找到的解决方案在以下位置进行了解释:stackoverflow.com/a/49227350/586195
标签: ruby sass osx-mountain-lion guard