0

我在编译更新到我的 .sass 文件时遇到guard问题guard-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

我正在使用默认 ruby​​ 安装(ruby 1.8.7,gem 1.3.6)在 OS X 10.8.3 上安装它。

我已经做了几个小时了,我完全被难住了,所以任何帮助都将不胜感激。

4

1 回答 1

1

取自 Guard wiki:

如果您在 Mac OS X 上并且遇到 Guard 对文件更改没有反应或 Pry 行为异常的问题,那么您可能会在使用 libedit 而不是 readline 的 Ruby 构建下受到影响。

要解决您的问题,您需要安装适当的 Readline 支持。由于 Ruby 1.8.7 将于 6 月结束生命周期并且不会收到安全更新,因此我建议升级到 Ruby 2.0.0。

于 2013-04-09T13:21:49.750 回答