I tried to install metric_fu against my Ruby 1.9 environment, but it failed due to the problem below:
$ gem install metric_fu
...
Fetching: rcov-1.0.0.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing metric_fu:
ERROR: Failed to build gem native extension.
/Users/xxx/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb
**** Ruby 1.9 is not supported. Please switch to simplecov ****
It says "switch to simplecov", but how to do that?
UPDATE: Resoved after installing rcov 0.9.11. I found the same issue here:
https://github.com/iain/metrical/issues/12
You can use SimpleCov by adding
gem 'simplecov', :require => false
to your gem file in the test group, and then add into your spec_helper.rb:
require 'simplecov'
SimpleCov.start
then just open coverage/index.html and you get SimpleCov in the browser. It's really excellent.
I'm the new maintainer of metric_fu and it should work now on ruby 1.9 without any problems. See configuration instructions at https://github.com/metricfu/metric_fu which include how you can have metric_fu load external coverage output (e.g. using simplecov)
Rcov on ruby 1.9 segfaults and fails a lot, so running it is disabled by default and the gem is no longer included as a dependency. However, you may still config it to run or load coverage stats you've already generated
Also, it works from the command-line now. Now need to bundle it or run rake or metrical
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With