guard/guard — Issue #162: Guard quits after startup on JRuby and OSX
Author: pgroudas
Created: 2011-10-14 16:24:09+00:00
State: open

guardfile:

```ruby
guard 'bundler' do
watch('Gemfile')
end

guard 'rspec', :all_on_start => false, :all_after_pass => false do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }

watch('spec/spec_helper.rb') { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
end
```

Now when I execute guard it just parses the file and quits:

```
$ bundle exec guard -d
Guard is now watching at '/Users/paul/code/IM/code/extranet'
DEBUG (12:23:07): Hook :start_begin executed for Guard::Bundler
DEBUG (12:23:07): Command execution: bundle check
Bundle already up-to-date
DEBUG (12:23:12): Command execution: growlnotify --version
DEBUG (12:23:12): Hook :start_end executed for Guard::Bundler
DEBUG (12:23:12): Hook :start_begin executed for Guard::RSpec
Guard::RSpec is running, with RSpec 2!
DEBUG (12:23:12): Hook :start_end executed for Guard::RSpec
$
```

I'm using JRuby 1.6.3 on OSX 10.7.