title: using guard with the guard/phpunit plugin
body: <p>When I run guard init I get an error </p>
  
  <pre><code>app&gt;guard init
  14:56:14 - ERROR - Could not load 'guard/phpunit' or '~/.guard/templates/phpunit
  ' or find class Guard::Phpunit
  </code></pre>
  
  <p>the guard file is created but its empty. It should contain this code</p>
  
  <pre><code>guard 'phpunit', :cli =&gt; 'colors' do
  watch(%r{^.+Test.php$})
  end
  </code></pre>
  
  <p>but when I edit the file manually to include it and run guard I get</p>
  
  <pre><code>app&gt;guard
  14:59:32 - ERROR - Could not load 'guard/phpunit' or find class Guard::Phpunit
  14:59:32 - ERROR - C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb
  :1637:in `raise_if_conflicts'
  &gt; [#] C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:746:in `acti
  vate'
  &gt; [#] C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:212:in `rescue in try_acti
  vate'
  &gt; [#] C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:209:in `try_activate'
  &gt; [#] C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:59:in `resc
  ue in require'
  &gt; [#] C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `requ
  ire'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/plugin_util.rb:1
  00:in `plugin_class'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/plugin_util.rb:5
  7:in `initialize_plugin'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard.rb:167:in `add_p
  lugin'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/dsl.rb:175:in `b
  lock in guard'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/dsl.rb:173:in `e
  ach'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/dsl.rb:173:in `g
  uard'
  &gt; [#] C:/Users/Mark/Dropbox/www/trainercompare/app/Guardfile:4:in `_instance_eva
  l_guardfile'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/guardfile/evalua
  tor.rb:121:in `instance_eval'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/guardfile/evalua
  tor.rb:121:in `_instance_eval_guardfile'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/guardfile/evalua
  tor.rb:37:in `evaluate_guardfile'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/setuper.rb:144:i
  n `evaluate_guardfile'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/setuper.rb:62:in
   `setup'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/commander.rb:24:
  in `start'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/cli.rb:96:in `st
  art'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in
  `run'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120
  :in `invoke_command'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispat
  ch'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `s
  tart'
  &gt; [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/bin/guard:6:in `&lt;top (requ
  ired)&gt;'
  &gt; [#] C:/Ruby193/bin/guard:23:in `load'
  &gt; [#] C:/Ruby193/bin/guard:23:in `&lt;main&gt;'
  14:59:32 - ERROR - Invalid Guardfile, original error is:
  &gt; [#] undefined method `superclass' for nil:NilClass
  C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/plugin_util.rb:57:in `
  initialize_plugin': undefined method `superclass' for nil:NilClass (NoMethodErro
  r)
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard.rb:167:in
   `add_plugin'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/dsl.rb:17
  5:in `block in guard'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/dsl.rb:17
  3:in `each'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/dsl.rb:17
  3:in `guard'
          from C:/Users/Mark/Dropbox/www/trainercompare/app/Guardfile:4:in `_insta
  nce_eval_guardfile'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/guardfile
  /evaluator.rb:121:in `instance_eval'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/guardfile
  /evaluator.rb:121:in `_instance_eval_guardfile'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/guardfile
  /evaluator.rb:37:in `evaluate_guardfile'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/setuper.r
  b:144:in `evaluate_guardfile'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/setuper.r
  b:62:in `setup'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/commander
  .rb:24:in `start'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/lib/guard/cli.rb:96
  :in `start'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb
  :27:in `run'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation
  .rb:120:in `invoke_command'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in
  `dispatch'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:43
  9:in `start'
          from C:/Ruby193/lib/ruby/gems/1.9.1/gems/guard-2.2.4/bin/guard:6:in `&lt;to
  p (required)&gt;'
          from C:/Ruby193/bin/guard:23:in `load'
          from C:/Ruby193/bin/guard:23:in `&lt;main&gt;'
  </code></pre>
  
  <p>I think the problem is that guard/phpunit is an abandoned project and has not been updated to support the latest guard.  I think this because when I delete all the gem files relating to guard 2.2.4 and leave only the files relating to guard 1.8.3 guard will run and watch the files and run phpunit once (fail which it shouldnt) and then refuse to continue watching so its not working completely but gets a step further.</p>
  
  <ol>
  <li>Can anyone give me a fix?</li>
  <li>I am not a rubyist but the code in guard/phpunit looks straightforward enough, can anyone give me a link to somewhere that explains how to go about making sure a plug in is compatible with guard 2.2.4?  I could then try it myself</li>
  <li>any other ideas?</li>
  </ol>
  
  <p>I am not a rubyist but the code in guard/phpunit looks straightforward enough and I am wonderin</p>