Wrong number of arguments when executing guard

I'm currently running the following Guardfile

guard 'cucumber' do 
  watch(%r{^features/.+\.feature$})
  watch(%r{^features/support/.+$})          { 'features' }
  watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] }
end

After running

> bundle exec guard --debug

I receive the following output

13:59:55 - ERROR - Invalid Guardfile, original error is:
> [#] wrong number of arguments (2 for 1)
13:59:55 - ERROR - No guards found in Guardfile, please add at least one.
13:59:55 - DEBUG - Command execution: which notify-send
13:59:55 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
13:59:55 - INFO - Guard is using TerminalTitle to send notifications.
13:59:55 - DEBUG - Command execution: hash stty
13:59:55 - DEBUG - Guard starts all plugins
13:59:55 - INFO - Guard is now watching at '/opt/app'
13:59:58 - DEBUG - Start interacto

I'm using Ruby 1.9.3p551, Rubygems is 2.6.2, guard 1.8.3, guard-cucumber 2.0.0.

Any suggestion of what could be the problem?

Answers


Upgrade to Guard 2.13.0 (Guard 1.8.3 is obsolete).

It might be because older Guard expects a symbol, and not a string, so this could work:

guard :cucumber do 

Need Your Help