Need help with metrical?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

128 Stars 22 Forks 35 Commits 7 Opened issues


Run MetricFu without making it part of your projects depencies.

Services available


Need anything else?

Contributors list

# 168,473
33 commits
# 18,999
1 commit

Warning: This gem is not being maintained anymore!

I work exclusively with Ruby 1.9, and most tools included don't (fully) support it. If you want to take over the project, fork the project, and open an issue stating your intentions.


Build Status

MetricFu is awesome! Metrical strives to make it a little bit easier to get working.


Cleverer defaults

Normally, RCov would work on a black-listing basis. This means that your coverage reports would occasionally be flooded with code outside your project. No longer, because the default is now to exclude everything and only include your

directories. It also fixes some issues with loading RSpec.


You're advised to install it with Bundler, because of dependency issues. Add this to your

gem 'metrical', :require => false

Then run:

bundle install

And run it:

bundle exec metrical


You can configure MetricFu in a

file in the root of your project. do |config|
  config.metrics -= [ :rcov ]

For more information on configuring your metrics, please visit the MetricFu homepage.

You can also turn off metrics when running, for instance:

bundle exec metrical --no-rcov

The metrics you can turn on and off depend on the type of project you are in. For instance, Rails projects also have

as options.

Also, Metrical tries to be smart about your Ruby version. Some metrics are not available on Ruby 1.9 and are disabled automatically.

To see which metrics are available, run:

bundle exec metrical --help

And that's all there is too it. If you have any suggestions, ideas or bug fixes, please drop me a line, or make a github issue.

Known issues

General lack of support of Ruby 1.9

Most tools don't handle Ruby 1.9 new syntax properly. It doesn't look like this is going to change any time soon.

RCov and Ruby 1.9

RCov doesn't work at all with Ruby 1.9. You should use something like SimpleCov. Unfortunately, it hasn't been included into MetricFu yet. Until then, Metrical automatically disables RCov under Ruby 1.9.

New syntax in Ruby 1.9

Most metrics can't cope with the new syntax in Ruby 1.9. There is nothing I can do about that, or the creator of these metrics, because the root lie in the code parser they use. Either don't use the new syntax or exclude these metrics in your


Roodi vs. Psych

If you're running Ruby 1.9 with Psych as your default YAML parser (possible in 1.9.2, and the default in 1.9.3), you might get an error message. Read this issue.

Gem dependency issues

Metrical depends on a lot of other gems. This means that sometimes, when a new version of a gem is released, Rubygems will load the wrong version of the gem, that might be incompatible.

If you get a message like

can't activate X, already activated Y
, or something similar, use Bundler.


Install dependencies:

gem install bundler && bundle install

Run the specs:



Version 0.1.0:

  • Finally added tests and added metrical to Travis
  • Add option
    to stop it from opening in the browser
  • Automatically turn off RCov in Ruby 1.9.x
  • Depend on RCov 0.9, so installation will work under Ruby 1.9
  • Remove other dependencies, it looks like MetricFu has that covered now.
  • Automatically turn off Saikuro on Ruby 1.9.x
  • Add switches for every metric (run
    metrical --help
    to see them all)

Copyright 2010-2011, Iain Hecker - Released under the MIT License.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.