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:
You can use SimpleCov by adding
to your gem file in the test group, and then add into your spec_helper.rb:
then just open coverage/index.html and you get SimpleCov in the browser. It's really excellent.