【发布时间】:2012-03-24 08:22:30
【问题描述】:
我有一个保护文件,其唯一目的是将咖啡脚本文件重新编译为 js 并将 sass 文件重新编译为 css。所以我创建了一个 Gemfile 为:
source :rubygems
group :development do
gem 'therubyracer'
gem 'guard-coffeescript'
gem 'guard-sass'
gem 'ruby_gntp'
end
还有一个 Guardfile:
group :development do
guard :coffeescript, :all_on_start => true, :input => '.', :output => '.'
guard :sass, :input => 'css', :output => 'css'
end
当我执行bundle exec guard 时,我得到了这个:
Guard uses GNTP to send notifications.
Guard is now watching at '/Users/sxross/Developer/Safari Extensions/iStockphoto/iStockphoto.safariextension'
Compile
Successfully generated
ERROR: Error sending notification with gntp: Connection refused - connect(2)
sass 已成功生成,但咖啡脚本未成功生成。我也在努力解决 GNTP 问题。我在 Lion 上运行,并且拥有最新版本的 Growl 和 Growl Notifier。我刚刚安装了 ruby_gntp gem,所以它应该是最新的。
作为背景,这是一个巨大的锤子,旨在绕过这样一个事实:coffee -wc foo.coffee 最初编译,然后编译第一个更改,然后再也不做任何事情。
谢谢
【问题讨论】:
-
直接编译CoffeeScript有报错吗?你确定这个输出没有遗漏吗?
Compile线和Successfully generated线看起来格格不入。 -
编译 CoffeeScript 没有错误。我已经在这样做了。
Compile和Successfully generated来自 CoffeeScript 保护 gem。无论如何,编译中的sass。我提供的输出是完整的。除了 gntp 之外没有任何错误。奇怪的是,即使它报告成功,它实际上并没有进行编译。
标签: ruby-on-rails coffeescript bundler guard growl