kopongo.com

home

to_plain_segments error

23 Sep 2008

I recently tried to start using metric-fu for code statistics. This makes use of the rcov gem, as well as a few other gems. It generates the statistics with the rake task rake metrics:all_with_migrate. Somehow, this caused a slew of errors in the functional tests, all looking like this:

NoMethodError: undefined method `to_plain_segments' for #<ActionController::Routing::RouteSet:0x2aaaacad5648>

On the Mac, everything worked fine. On Fedora 6 hosts running 1.8.5 or 1.8.6 I would get the error. A bit of googling found that some rspec people are getting it too, but it's not rspec's fault. It's rcov.

I updated my rcov to the yet-unofficially unreleased version 0.8.3.1, thanks to a github branch of rcov.

sudo gem install spicycode-rcov -s http://gems.github.com

That fixes it, and tests run fine now.