2013-05-12 62 views
0

我想用後衛來運行我的燻肉的測試,我Gemfile樣子:守衛開始然後退出?

source 'https://rubygems.org' 

gem 'sinatra' 
gem 'sidekiq' 
gem 'slim' 
gem 'puma' 
gem 'nokogiri' 
gem 'httparty' 

group :test, :development do 
    gem 'guard' 
    gem 'bacon' 
    gem 'guard-bacon' 
    gem 'libnotify' 
    gem 'rb-inotify' 
end 

Guardfile看起來像

# parameters: 
# output  => the formatted to use 
# backtrace => number of lines, nil = everything 
guard 'bacon', :output => "BetterOutput", :backtrace => 4 do 
    watch(%r{^lib/(.+)\.rb$})  { |m| "specs/lib/#{m[1]}_spec.rb" } 
    watch(%r{specs/.+\.rb$}) 
end 

當我運行guard會發生以下情況

$ guard 
Bacon: Using output BetterOutput. 
Bacon: Limiting backtrace to 4 lines. 
09:02:05 - INFO - Guard uses Libnotify to send notifications. 
09:02:05 - INFO - Guard uses TerminalTitle to send notifications. 
09:02:05 - INFO - Guard is now watching at '/home/martin/code/jse-api' 
Guard::Bacon started. 
[1] guard(main)> %      
$ 

它似乎加載了一切,進入警衛提示並退出。

我不知道爲什麼?

回答

0

這個問題似乎被guard-bacon 1.1.0

所需版本的guard如果強制其最新版本的後衛

gem 'guard', '>= 1.8.0' 

的它回落到一個較舊版本的guard-bacon 1.0.5和一切正常。