Friday, March 5, 2010

rcov error on Windows

I have the following error at "rake test:coverage" at rcov - I cannot install rcov-0.9.8:

0 tests, 0 assertions, 0 failures, 0 errors
c:/ruby-1.8.7-p72-i386-mswin32/lib/ruby/1.8/rexml/formatters/pretty.rb:131:in `[]': no implicit conversion from nil to integer (TypeError)

I've been lookin for the solution for this and I finally found one at "".

I followed the step as he mentioned and it works now.
In summary, you need to change "lib/rcov/report.rb" of your rcov gem

if RUBY_VERSION == "1.8.6" && defined? REXML::Formatters::Transitive


if ["1.8.7", "1.8.6"].include?(RUBY_VERSION) && defined? REXML::Formatters::Transitive

Then, rerun

rake test:coverage

No comments:

Post a Comment