After upgrading to guard 2.6.1 guard stopped executing specs for changed file
13:27:09 - INFO - LiveReload is waiting for a browser to connect. 13:27:09 - INFO - Guard::RSpec is running 13:27:09 - INFO - Guard is now watching at '[path to project]' 13:27:13 - INFO - Running: spec/models/[some_model]_spec.rb 13:27:13 - ERROR - No cmd option specified, unable to run specs!
My bundle is
Using guard (2.6.1) Using guard-livereload (2.3.0) Using guard-rails (0.5.3) Using guard-rspec (4.3.1) Using rspec-core (2.14.8) Using rspec-expectations (2.14.5) Using rspec-mocks (2.14.6) Using rspec (2.14.1) Using rspec-rails (2.14.2) Using rails (4.0.4)
You need to update your Guardfile
and add the cmd
option.
Guard::RSpec 4.0 now uses a simpler approach with the new
cmd
option that let you precisely define which rspec command will be launched on each run. This option is required due to the number of different ways possible to invoke rspec, the template now includes a default that should work for most applications but may not be optimal for all.
This is how looks my Guardfile:
guard :rspec, cmd: "bundle exec rspec" do # ... end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With