Open stabarinde opened 11 years ago
I'm getting the same error. Any update on this?
I'll give it a go tomorrow. I don't have access to an appropriate windows install at the moment. @morozgrafix Are you using ruby 1.9.3 as well?
also receiving error: uninitialized constant CucumberTimingPresenter::TimingFormatter::UsageRecord Error creating formatter: CucumberTimingPresenter::TimingFormatter (NameError)
I am on ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.4.2]
I am also get the error.
even i get the same error on mac
uninitialized constant CucumberTimingPresenter::TimingFormatter::UsageRecord
Error creating formatter: CucumberTimingPresenter::TimingFormatter (NameError)
/Library/Ruby/Gems/2.0.0/gems/cucumber_timing_presenter-1.0.0.0/lib/cucumber_timing_presenter/timing_formatter.rb:8:in initialize' /Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.15/lib/cucumber/cli/configuration.rb:183:in
new'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.15/lib/cucumber/cli/configuration.rb:183:in block in formatters' /Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.15/lib/cucumber/cli/configuration.rb:178:in
map'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.15/lib/cucumber/cli/configuration.rb:178:in formatters' /Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.15/lib/cucumber/cli/configuration.rb:76:in
build_tree_walker'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.15/lib/cucumber/runtime.rb:46:in run!' /Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.15/lib/cucumber/cli/main.rb:47:in
execute!'
/Library/Ruby/Gems/2.0.0/gems/cucumber-1.3.15/bin/cucumber:13:in <top (required)>' /usr/bin/cucumber:23:in
load'
/usr/bin/cucumber:23:in <top (required)>' -e:1:in
load'
-e:1:in `
I have yet to see one of these cucumber "formatter" gems actually work right. For the problem mentioned here, you can add relative require statements in timing_formatter.rb:
require_relative 'usage_record'
require_relative 'unused_steps'
require_relative 'all_usage_results_html_presenter'
require_relative 'unused_steps_html_presenter'
require_relative 'step_average_and_total_html_presenter'
require_relative 'step_times_of_whole_html_presenter'
Do note however that you'll also get this:
wrong number of arguments (8 for 7) (ArgumentError)
timing_formatter.rb (line 24)
You have to add one parameter to the after_step_result() method:
def after_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
Still, though, given the relative requires needed, I would restructure the gem or simply fork a new version. I'm finding I'm going to have to do that with just about every cucumber formatter gem out there. (That said, Cucumber 2.0 is just coming out, so it will be good to make sure no new formatter changes are needed. I think the API is backward compatible with the 1.x branch, but ... you know.)
After installing cucumber_timing_presenter with "gem install cucumber_timing_presenter", and attempting to run as per the README ( "cucumber -t @PERF_001 -f CucumberTimingPresenter::TimingFormatter --expand" ) I get the following error;
uninitialized constant CucumberTimingPresenter::TimingFormatter::UsageRecord Error creating formatter: CucumberTimingPresenter::TimingFormatter (NameError) c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber_timing_presenter-1.0.0.0/lib/cucumber_timing_presenter/timing_formatter.rb:8:in
initialize' c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/lib/cucumber/cli/configuration.rb:183:innew' c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/lib/cucumber/cli/configuration.rb:183:in
block in formatters' c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/lib/cucumber/cli/configuration.rb:178:inmap' c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/lib/cucumber/cli/configuration.rb:178:in
formatters' c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/lib/cucumber/cli/configuration.rb:76:inbuild_tree_walker' c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/lib/cucumber/runtime.rb:45:in
run!' c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/lib/cucumber/cli/main.rb:47:inexecute!' c:/Ruby193/lib/ruby/gems/1.9.1/gems/cucumber-1.3.1/bin/cucumber:13:in
<top (required)>' c:/Ruby193/bin/cucumber:23:inload' c:/Ruby193/bin/cucumber:23:in
My gems are;
Running on windows (but also on linux). cucumber_timing_presenter should be able to see UsageRecord.rb but somehow it cannot.
Any ideas?
Regards,
Dermot