RCov is strictly limited to Matz's reference implemenation of Ruby (MRI) 1.8.x and doesn't even work on MRI 1.9.x.
SimpleCov is the new way to go, as it uses the new Ruby Coverage API. This API for a while was not supported by JRuby, or at least not to an extent that it was usable in production. The original issue on SimpleCov's bugtracker doesn't state explicitly that it works now. However, the issue they files in the JRuby tracker about this Ruby Coverage API not working correctly states that this issue is now resolved.
I guess you should try your luck with the latest versions of both JRuby and SimpleCov.
On the other topic:
Ruby's -I
flag adds directories to the $LOAD_PATH
array which defines the locations in which .rb
files are searched when you try to load them with require
. As of Ruby 1.9.x files can only be found when they are in one of the directories in $LOAD_PATH
and are no longer also found relative to the current working directory of your Ruby process.