guard-phpunit2
guard-phpunit2 copied to clipboard
Could not load 'guard/phpunit2' or' ' find class Guard::Phpunit2
I have just installed guard and phpunit2. When running "guard init" in my project folder, I get following error:
[canfiax:~/lesson] $ guard init
16:30:12 - ERROR - Could not load 'guard/phpunit2' or' ' find class Guard::Phpunit2
16:30:12 - ERROR - Error is: cannot load such file -- guard/guard
16:30:12 - ERROR - /usr/local/Cellar/ruby/2.1.2_2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
> [#] /usr/local/Cellar/ruby/2.1.2_2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
> [#] /usr/local/Cellar/ruby/2.1.2_2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
> [#] /usr/local/lib/ruby/gems/2.1.0/gems/guard-phpunit2-0.2.7/lib/guard/phpunit2.rb:2:in `<top (required)>'
> [#] /usr/local/Cellar/ruby/2.1.2_2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
> [#] /usr/local/Cellar/ruby/2.1.2_2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
[..... and more]
What is wrong?
@canfiax I'm having the same issue.. What a nuisance. You can try the instructions here: http://kentch84.wordpress.com/2014/07/19/osx-gem-guard-in-guard-phpunit-terminal-notification/
or abandon guard altogether and go with grunt: http://blog.elenakolevska.com/using-grunt-with-laravel-and-bootstrap/
I'm not a fan of grunt but we do use gulp in our project so that may be an option and would eliminate ruby/guard altogether. But I too was content with guard for phpunit when the original worked.
This is due to the deprecated Guard::Guard
extension point was removed. #18 fixes this
To use the stable version of this plugin you should set your guard dependency to <2.9.0
thanks @slbmeh
Just went ahead and downgraded Guard. Here's my Gemfile in case others want to go ahead with this solution (you'll get a big deprecation warning but otherwise everything runs fine.)
source "https://rubygems.org"
ruby '1.9.3'
group :development do
gem 'guard', '< 2.9.0'
gem 'guard-phpunit2'
end