【问题标题】:guard/guard-sass not compiling changes守卫/守卫 sass 不编译更改
【发布时间】:2013-03-31 03:45:41
【问题描述】:

我在将 guardguard-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)安装它。

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

【问题讨论】:

标签: ruby sass osx-mountain-lion guard


【解决方案1】:

取自 Guard 维基:

如果您在 Mac OS X 上并且遇到 Guard 不 对文件更改做出反应或 Pry 行为异常,那么您可能 在使用 libedit 而不是 readline 的 Ruby 构建中受苦。

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

【讨论】:

  • 所以阅读文档是一件小事!不知道我怎么错过了那个。一直在尝试避免 RVM,但我已经安装了它和 Ruby 2.0.0 并且它可以正常工作。感谢您的帮助:)
猜你喜欢
  • 2017-11-27
  • 2011-12-22
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-01-19
  • 2011-01-17
  • 2020-08-03
相关资源
最近更新 更多