You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Outside of the context of bundle exec, I'm able to generate documentation. Unfortunately, the rest of my application needs to run in context of Bundler.
When running a Cucumber scenario via "bundle exec cucumber", I get
[error]: Invalid configuration file, using default options.
[error]: NameError: uninitialized constant Cucumber::Gherkin::AstBuilder
[error]: Stack trace:
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/yard-cucumber-3.0.0/lib/cucumber/city_builder.rb:3:in `<module:Parser>'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/yard-cucumber-3.0.0/lib/cucumber/city_builder.rb:2:in `<module:Cucumber>'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/yard-cucumber-3.0.0/lib/cucumber/city_builder.rb:1:in `<top (required)>'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/yard-cucumber-3.0.0/lib/yard-cucumber.rb:14:in `require'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/yard-cucumber-3.0.0/lib/yard-cucumber.rb:14:in `<top (required)>'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/yard-0.8.7.6/lib/yard/config.rb:161:in `require'
There was an error while trying to load the gem 'yard-cucumber'. (Bundler::GemRequireError)
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:80:in `rescue in block (2 levels) in require'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/Users/cameron/Desktop/yard_cucumber_example/features/support/env.rb:1:in `<top (required)>'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/cucumber-2.3.3/lib/cucumber/rb_support/rb_language.rb:96:in `load'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/cucumber-2.3.3/lib/cucumber/rb_support/rb_language.rb:96:in `load_code_file'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/cucumber-2.3.3/lib/cucumber/runtime/support_code.rb:142:in `load_file'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/cucumber-2.3.3/lib/cucumber/runtime/support_code.rb:84:in `block in load_files!'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/cucumber-2.3.3/lib/cucumber/runtime/support_code.rb:83:in `each'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/cucumber-2.3.3/lib/cucumber/runtime/support_code.rb:83:in `load_files!'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/cucumber-2.3.3/lib/cucumber/runtime.rb:254:in `load_step_definitions'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/cucumber-2.3.3/lib/cucumber/runtime.rb:62:in `run!'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/cucumber-2.3.3/lib/cucumber/cli/main.rb:32:in `execute!'
/Users/cameron/.rvm/gems/ruby-2.3.0/gems/cucumber-2.3.3/bin/cucumber:8:in `<top (required)>'
/Users/cameron/.rvm/gems/ruby-2.3.0/bin/cucumber:23:in `load'
/Users/cameron/.rvm/gems/ruby-2.3.0/bin/cucumber:23:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'
The specific complaint being uninitialized constant Cucumber::Gherkin::AstBuilder in yard-cucumber-3.0.0/lib/cucumber/city_builder.rb
It seems that, with Bundler at least, there is an attempt during inheritance to find Gherkin::AstBuilder within the scope of the parent Cucumber module of city_builder.rb, which doesn't exist.
I experimented and noticed if I added an include Gherkin to city_builder.rb, the errors went away:
There was an error while trying to load the gem 'yard-cucumber'.
Gem Load Error is: uninitialized constant Cucumber::Gherkin::AstBuilder
fixesburtlo#72
I'm trying to use:
with:
Outside of the context of
bundle exec
, I'm able to generate documentation. Unfortunately, the rest of my application needs to run in context of Bundler.When running a Cucumber scenario via "bundle exec cucumber", I get
The specific complaint being
uninitialized constant Cucumber::Gherkin::AstBuilder
inyard-cucumber-3.0.0/lib/cucumber/city_builder.rb
It seems that, with Bundler at least, there is an attempt during inheritance to find
Gherkin::AstBuilder
within the scope of the parentCucumber
module ofcity_builder.rb
, which doesn't exist.I experimented and noticed if I added an
include Gherkin
tocity_builder.rb
, the errors went away:I'm not clear what else that change would break, however.
The text was updated successfully, but these errors were encountered: