Rake spec:rcov failing

Trying to run the ‘spec:rcov’ task and failing with error below.

I saw a post from last year with a different REXML error but it was a

Any help appreciated.


Ruby 1.8.6
Rails 2.02
RSpec-1.1.3 (build 20080131122909)
REXML 3.1.6

876 examples, 0 failures, 87 pending
/opt/local/lib/ruby/site_ruby/1.8/rexml/text.rb:155:in `check’: Illegal
character ‘<’ in raw string " (RuntimeError)
// <![CDATA[
function toggleCode( id ) {
if ( document.getElementById )
elem = document.getElementById( id );
else if ( document.all )
elem = eval( “document.all.” + id );
return false;

elemStyle = elem.style;

if ( elemStyle.display != "block" ) {
  elemStyle.display = "block"
} else {
  elemStyle.display = "none"

return true;


// Make cross-references hidden by default
document.writeln( “<style type=“text/css”>span.cross-ref { display:
}” )
// ]]>
" from /opt/local/lib/ruby/site_ruby/1.8/rexml/text.rb:153:in
each' from /opt/local/lib/ruby/site_ruby/1.8/rexml/text.rb:153:incheck’
from /opt/local/lib/ruby/site_ruby/1.8/rexml/text.rb:125:in
parent=' from /opt/local/lib/ruby/site_ruby/1.8/rexml/parent.rb:19:in<<’
from (eval):161:in <<' from (eval):112:increate’
from (eval):372:in h_' from /opt/local/lib/ruby/gems/1.8/gems/rcov-’
… 28 levels…
dump_coverage_info' from /opt/local/lib/ruby/gems/1.8/gems/rcov-’
from /opt/local/lib/ruby/gems/1.8/gems/rcov-


Did you have any luck with this? I ran into this problem today, with
Rcov, RSpec 1.1.3, and REXML


I havne’t take a look yet, but a couple of points:

  • I was mistaken in my OP; I’m running REXML
  • I saw a different post on a related topic that seemed to blame REXML

I’d been meaning to go back to an earlier version of REXML and see if
fixed it since I had rcov working on this project a while back and I did
upgrade my REXML version at some point.

Wow, ok…I have had other trouble with REXML being too
finicky…a few weeks back I found it enforcing declaration of XML
namespaces even though it doesn’t seem to be actually doing anything
with namespaces except refusing to parse if they weren’t properly

So, I did suspect the REXML version until I saw you were running 3.1.6.

I downgraded to 3.1.7 and it’s working now! Don’t know if it’s REXML
being buggy or just finicky, but I’m glad to have something working.



This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs