-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialising guard-cucumber plugin fails with Error #42
Comments
Meanwhile, I upgraded to macOS 12.5 (Monterey) and Ruby 3.1.2 … and the behaviour persists. |
Another bit of experimenting showed that initialisation fails, when running in a bundler context: > cat Gemfile
source 'https://rubygems.org'
ruby '3.1.2'
gem 'guard-cucumber'
gem 'guard'
> gem list bundler
*** LOCAL GEMS ***
bundler (2.3.19, default: 2.3.18)
guard-bundler (3.0.0)
> gem list "^guard$"
*** LOCAL GEMS ***
guard (2.18.0)
> gem list "guard-cucumber"
*** LOCAL GEMS ***
guard-cucumber (3.0.0)
> guard init guard-cucumber
Warning: you have a Gemfile, but you're not using bundler or RUBYGEMS_GEMDEPS
13:40:10 - INFO - Writing new Guardfile to /Users/stephan/dev/tmp/gaincute/Guardfile
13:40:11 - INFO - cucumber guard added to Guardfile, feel free to edit it
> cat Guardfile
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features) \
# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
# $ mkdir config
# $ mv Guardfile config/
# $ ln -s config/Guardfile .
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
cucumber_options = {
# Below are examples overriding defaults
# cmd: 'bin/cucumber',
# cmd_additional_args: '--profile guard',
# all_after_pass: false,
# all_on_start: false,
# keep_failed: false,
# feature_sets: ['features/frontend', 'features/experimental'],
# run_all: { cmd_additional_args: '--profile guard_all' },
# focus_on: { 'wip' }, # @wip
# notification: false
}
guard "cucumber", cucumber_options do
watch(%r{^features/.+\.feature$})
watch(%r{^features/support/.+$}) { "features" }
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
Dir[File.join("**/#{m[1]}.feature")][0] || "features"
end
end
> rm Guardfile
> bundle exec guard init guard-cucumber
13:40:38 - INFO - Writing new Guardfile to /Users/stephan/dev/tmp/gaincute/Guardfile
13:40:38 - ERROR - Could not load 'guard/guard-cucumber' or '~/.guard/templates/guard-cucumber' or find class Guard::Guardcucumber
> [#]
> cat Guardfile
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features) \
# .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
# $ mkdir config
# $ mv Guardfile config/
# $ ln -s config/Guardfile .
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile" So, when not running in a bundler context it seems to work. |
Hi, I did a git bisect between I am talking here also about the error that occurs when running
The commit 4c7d0e4 was found to cause this error: This changes |
@todd-a-jacobs I did revert the commit in #43 and the problem (the Error message mentioned above) goes away. |
Setup/Configuration/Environment
OS: macOS (11.1, Big Sur)
Ruby: 3.0.0 installed using rvm
Bundler:
Gemfile:
Behaviour
Initialising
guard-cucumber
fails with an error message:A
Guardfile
is created, but withoutguard-cucumber
specific content:Observation
Reverting to the previous release of
guard-cucumber
usingin the
Gemfile
instead of '3.0.0' works.Since using the previous version of the plugin avoids the error _and creates a
Cucumber
relatedGuardfile
, I presume this is in fact an issue withguard-cucumber
notGuard
itself.The
Guardfile
created with guard-cucumber 2.1.2:The text was updated successfully, but these errors were encountered: