Take the 2-minute tour ×

I hit a wall today with rcov + Rails3.

I am developing my Rails3 app using Ruby 1.9.2-preview3. rcov and relevance-rcov do not work with Ruby 1.9.2 yet. I can't find any fork of rcov that does yet either. It wasn't that big of a deal since I could easily switch over to Ruby 1.8.7 using rvm --default 1.8.7; rake test:coverage.

So then today I brought my app forward from beta4 to Rails 3.0.0-rc. That version requires linecache19. The problem is linecache19 doesn't compile with 1.8.7, only 1.9.2-preview3, it can't see my vm_core.h file no matter how I configure it's --include-* params. That means I lost my working rcov on my Ruby 1.8.7 setup and I now only have a barely working rcov with my 1.9.2-preview3 setup, and it creates terribly wrong coverage stats.

What's my short-term solution for a working, accurate rcov?

share|improve this question
add comment

2 Answers

yeah 1.9.2 doesn't work with trace events, I don't think, so revert to 1.9.1 (or did you have it working once?)



share|improve this answer
'simplecov' is the answer. It uses the built-in coverage module in Ruby 1.9. –  gdonald Feb 23 '11 at 22:38
add comment

with ruby1.9.2+ you need to use linecache19

share|improve this answer
add comment

Your Answer


