agent-ruby icon indicating copy to clipboard operation
agent-ruby copied to clipboard

'cannot load such file -- cucumber/formatter/hook_query_visitor' getting for reportal portal

Open radhakrishnanakireddy opened this issue 5 years ago • 4 comments

Hi, I am facing 'cannot load such file -- cucumber/formatter/hook_query_visitor' error while trying to use agent-ruby.

cannot load such file -- cucumber/formatter/hook_query_visitor Error creating formatter: ReportPortal::Cucumber::Formatter (LoadError) C:/Ruby26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' C:/Ruby26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' C:/Ruby26/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/report.rb:20:in <top (required)>' C:/Ruby26/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/formatter.rb:21:in require_relative' C:/Ruby26/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/formatter.rb:21:in <top (required)>' C:/Ruby26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' C:/Ruby26/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in require' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/lib/cucumber/constantize.rb:19:in rescue in constantize' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/lib/cucumber/constantize.rb:8:in constantize' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/lib/cucumber/configuration.rb:215:in formatter_class' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/lib/cucumber/configuration.rb:201:in block in formatter_factories' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/lib/cucumber/configuration.rb:199:in map' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/lib/cucumber/configuration.rb:199:in formatter_factories' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/lib/cucumber/runtime.rb:187:in formatters' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/lib/cucumber/runtime.rb:172:in report' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/lib/cucumber/runtime.rb:76:in run!' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/lib/cucumber/cli/main.rb:29:in execute!' C:/Ruby26/lib/ruby/gems/2.6.0/gems/cucumber-4.1.0/bin/cucumber:9:in <top (required)>' C:/Ruby26/bin/cucumber:23:in load' C:/Ruby26/bin/cucumber:23:in

'

environment details ruby -2.6 latest reprotportal with docker.

Please help me with it to resolve

Thank you

radhakrishnanakireddy avatar Jul 03 '20 04:07 radhakrishnanakireddy

Yeah, the gem wasn't updated for Cucumber 4. But I don't have time to support agent-ruby anymore.

abotalov avatar Jul 03 '20 14:07 abotalov

@radhakrishnanakireddy I've added support for cucumber > 4 in to a branch at https://github.com/pmthexton/agent-ruby/tree/cucumber4

I'm not convinced this is the cleanest or most correct way of doing so, but if your focus on it simply "working", then it should be good enough to see you through.

Note: I've only done this for cucumber, I've not paid any attention to parallel cucumber or rspec as I didn't need to worry about them for my use case.

pmthexton avatar Sep 09 '20 08:09 pmthexton

Is reportportal support cucumber 6.0.0? We are using the ruby with BDD.

I'm getting error like below cannot load such file -- http Error creating formatter: ReportPortal::Cucumber::Formatter (LoadError)

sravan666 avatar Sep 10 '21 11:09 sravan666

@pmthexton I have inserted gem 'reportportal', git: 'https://github.com/pmthexton/agent-ruby.git', branch: 'cucumber4' in my Gemfile to use your fix for Cucumber > 4, but I still get the same error mentioned here. Care to shed some light here?

dvernikos avatar Nov 30 '22 15:11 dvernikos