在 OS 10.6.6 上,使用 Guard 和 Spork 的 Growl 会静默失败

发布于 2024-12-15 06:56:25 字数 1722 浏览 3 评论 0原文

当测试通过或失败时,我没有收到 Growl 通知。我已经浏览了我能找到的所有设置指南。

详细信息

我运行 guard 并且它启动 Spork 正常:

Using RSpec
Preloading Rails environment
Loading Spork.prefork block...
Spork is ready and listening on 8989!

当我更改规范文件时,一切似乎都正常:

Running: spec/unit/category_spec.rb
Running tests with args ["--color", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/John/.rvm/gems/ruby-1.9.2-p290/gems/guard-rspec-0.5.2/lib/guard/rspec/formatters/notification_rspec.rb", "spec/unit/category_spec.rb"]...
.

Finished in 0.2063 seconds
1 example, 0 failures
Done.

但是...没有任何来自 Growl 的信息。

我尝试过的

  • 在 Growl 首选项窗格中的“应用程序”选项卡中勾选了 Guard
  • 安装了最新的 Growl for Snow Leopard - V1.2.2
  • Growl 已启动并且工作正常 - 我启用了 iTerm,并收到了该罚款的通知。
  • rb-fseventgrowlgrowl_notify 添加到 gem 文件中,并
  • 从 Growl 下载页面运行 bundle install 安装的 Growl Notify 包。
  • 重新启动我的 Mac

Gemfile

group :development, :test do
  gem 'factory_girl'
  gem 'rspec-rails'
  gem "guard-rspec"
  gem "spork", "> 0.9.0.rc"
  gem "guard-spork"
  gem 'rb-fsevent'
  gem 'growl_notify'
  gem 'growl'
end

更新

完全偶然,我发现当我从保护文件中删除 --drb 选项时:

之前:

guard 'rspec', :version => 2, :cli => "--drb"  do

之后:

guard 'rspec', :version => 2, :cli => ""  do

Growl开始工作了。但是当我这样做时,测试需要很长时间才能再次运行。

咆哮有效或测试很快......但不能两者兼而有之!

I get no Growl notifications when tests pass or fail. I've gone through all the setup guides I can find.

Details

I run guard and it starts Spork fine:

Using RSpec
Preloading Rails environment
Loading Spork.prefork block...
Spork is ready and listening on 8989!

When I change a spec file, everything seems OK:

Running: spec/unit/category_spec.rb
Running tests with args ["--color", "--format", "progress", "--format", "Guard::RSpec::Formatter::NotificationRSpec", "--out", "/dev/null", "--require", "/Users/John/.rvm/gems/ruby-1.9.2-p290/gems/guard-rspec-0.5.2/lib/guard/rspec/formatters/notification_rspec.rb", "spec/unit/category_spec.rb"]...
.

Finished in 0.2063 seconds
1 example, 0 failures
Done.

But... nothing from Growl.

What I've Tried

  • Ticked Guard in the Applications tab in Growl pref pane
  • Installed latest Growl for Snow Leopard - V1.2.2
  • Growl is started and working OK - I enable iTerm and I get notifications from that fine.
  • Added rb-fsevent, growl and growl_notify to gem file and ran bundle install
  • Installed Growl Notify package from the Growl Downloads page.
  • Restarted my Mac

Gemfile

group :development, :test do
  gem 'factory_girl'
  gem 'rspec-rails'
  gem "guard-rspec"
  gem "spork", "> 0.9.0.rc"
  gem "guard-spork"
  gem 'rb-fsevent'
  gem 'growl_notify'
  gem 'growl'
end

Update

By complete chance I found that when I removed the --drb option from the guard file:

Before:

guard 'rspec', :version => 2, :cli => "--drb"  do

After:

guard 'rspec', :version => 2, :cli => ""  do

Growl started working. But when I do this, the tests take ages to run again.

Growl works OR tests are fast ...but not both!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

阳光下的泡沫是彩色的 2024-12-22 06:56:25

我必须去获取咆哮通知才能让它在我的系统上工作。还有其他可用选项,但我找不到列出它们的网站或帖子。这对我来说是最容易设置的。咆哮通知与咆哮不同。

I had to go to get growl notify to get it to work with my system. There are other options available, but I can't find the website or post that lists them. That was the easiest for me to setup. Growl notify is different than Growl.

坠似风落 2024-12-22 06:56:25

最后,那枚硬币完全意外地掉了下来。

我的 Guardfile 中有以下行:

guard 'rspec', :version => 2, :cli => "--drb" do
    ....
end

问题是 --drb 开关 - 一旦我删除它,一切都很好:

guard 'rspec', :version => 2, :cli => "" do
    ....
end

现在,当测试通过/失败时,Growl 会立即通知我。欢呼!

Finally, the penny dropped, completely by accident.

I had the following line in my Guardfile:

guard 'rspec', :version => 2, :cli => "--drb" do
    ....
end

The problem was the --drb switch - once I removed it, all was well:

guard 'rspec', :version => 2, :cli => "" do
    ....
end

Now Growl notifies me immediately when tests pass/fail. Hurrah!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文