[RSpec] rcov and/or rexml bug?

Hi,

Running: Ruby 1.8.7 p72, RSpec 1.1.12 and rcov 0.8.1.2.0, I get the
following error message with $ rake spec:rcov


/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:131:in
[]': no implicit conversion from nil to integer (TypeError) from /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:131:inwrap’
from
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:131:in
wrap' from /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:90:inwrite_text’
from
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/default.rb:50:in
write' from /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:75:inwrite_element’
from
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:73:in
each' from /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:73:inwrite_element’
from
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/default.rb:31:in
write' from /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:75:inwrite_element’
from
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:73:in
each' from /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:73:inwrite_element’
from
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/default.rb:31:in
write' from /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:117:inwrite_document’
from
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:111:in
each' from /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:111:inwrite_document’
from
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/default.rb:28:in
write' from /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/document.rb:195:inwrite’
from (eval):93:in pretty' from /usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/lib/rcov/report.rb:1003:increate_file’
from
/usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/lib/rcov/report.rb:708:in
execute' from /usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/lib/rcov/report.rb:125:ineach’
from
/usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/lib/rcov/report.rb:125:in
each_file_pair_sorted' from /usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/lib/rcov/report.rb:707:inexecute’
from
/usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/lib/rcov.rb:640:in
dump_coverage_info' from /usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/lib/rcov.rb:640:ineach’
from
/usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/lib/rcov.rb:640:in
`dump_coverage_info’
from
/usr/local/ruby1.8.7/lib/ruby/gems/1.8/gems/rcov-0.8.1.2.0/bin/rcov:421
rake aborted!

Anyone ran into that? Should I downgrade my Ruby version to have it
work? I previously updated it to its latest release hoping bugs would be
fixed.

Fernando P. wrote:

Hi,

Running: Ruby 1.8.7 p72, RSpec 1.1.12 and rcov 0.8.1.2.0, I get the
following error message with $ rake spec:rcov

Anyone ran into that? Should I downgrade my Ruby version to have it
work? I previously updated it to its latest release hoping bugs would be
fixed.

I do not think it has anything to do with Ruby. Using Ruby 1.8.6, Rails
2.2.2,
RSpec 1.1.12 and Rcov 0.8.1.2.0 I get this error:

rake spec:rcov

invalid option: --output_dir
rake aborted!

I also had problems with spec_helper and the Rails logger. I am
thinking that maybe RSpec 1.1.12, Rails 2.2.2 and perhaps Rcov 0.8.1
have some incompatibilities.

David C. wrote:

On Tue, Feb 3, 2009 at 7:32 AM, James B. [email protected]
wrote:

thinking that maybe RSpec 1.1.12, Rails 2.2.2 and perhaps Rcov 0.8.1
have some incompatibilities.

Try spicycode’s rcov:

[sudo] gem install spicycode-rcov --source http://gems.github.com

I get the same errors as with rcov:

$rake rcov --trace
(in /home/byrnejb/projects/proforma.git)
rake aborted!
undefined method rcov=' for #<Rcov::RcovTask:0x7f5b6f24> /home/byrnejb/projects/proforma.git/lib/tasks/rcov_new.rake:26 /usr/lib/ruby/gems/1.8/gems/spicycode-rcov-0.8.1.5.0/lib/rcov/rcovtask.rb:92:in initialize’

David C. wrote:

On Tue, Feb 3, 2009 at 7:32 AM, James B. [email protected]
wrote:

thinking that maybe RSpec 1.1.12, Rails 2.2.2 and perhaps Rcov 0.8.1
have some incompatibilities.

Try spicycode’s rcov:

[sudo] gem install spicycode-rcov --source http://gems.github.com

Something got screwed when uninstalling the old rcov gem, I now get the
following error message:

rm -r coverage
/usr/local/ruby1.8.7//bin/ruby: No such file or directory – rcov
(LoadError)
rake aborted!

What is it looking for? an rcov binary? When I issue: $ which rcov, it
can’t find anything.

Something got screwed when uninstalling the old rcov gem, I now get the
following error message:

Finally got things back to ‘almost’ normal, I had to edit my $PATH var
to make rcov 0.8.1.2 work and bug on:
/usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:131:in
`[]’: no implicit conversion from nil to integer (TypeError)

So I uninstalled rcov, and installed instead: spicycode-rcov, but now it
cannot find the binary file. Using spicycode do I need to make any tweak
to a rake file?

On Tue, Feb 3, 2009 at 7:32 AM, James B. [email protected]
wrote:

thinking that maybe RSpec 1.1.12, Rails 2.2.2 and perhaps Rcov 0.8.1
have some incompatibilities.

Try spicycode’s rcov:

[sudo] gem install spicycode-rcov --source http://gems.github.com

On Sat, Feb 7, 2009 at 12:06 PM, Fernando P. [email protected]
wrote:

a clear and easy an uninstall option.

Posted via http://www.ruby-forum.com/.

Hi

You shouldn’t have to clone and install rcov manually.

Just do this:

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

It will install just like any other gem.

Rob

You shouldn’t have to clone and install rcov manually.

Just do this:

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

It will install just like any other gem.

Except it didn’t work for me, the rcov binary doesn’t get installed or
is not defined properly. Is anyone else experiencing the same problem?

So I uninstalled rcov, and installed instead: spicycode-rcov, but now it
cannot find the binary file. Using spicycode do I need to make any tweak
to a rake file?

I finally got everything working with no bugs by doing:

  1. git clone git://github.com/spicycode/rcov.git
  2. cd rcov
  3. sudo ruby setup.rb

At this point it would still not work as it couln’t find the rcov
binary. So I did one more step:

  1. sudo ruby setup.rb config

Maybe step 3 can be replaced by step 4?

However now spicycode-rcov doesn’t appear in $ gem list, and I don’t
know how to uninstall it or update it. God I hate apps that don’t offer
a clear and easy an uninstall option.

Githubs recent gem builder changes have caused some issues with
this. We are looking into it today in more detail. Pulling it down
and manually building should definitely work in the meantime.


Chad H.
spicycode

On Thu, Apr 16, 2009 at 3:36 PM, Fernando P.
[email protected]wrote:

Chad H. wrote:

Githubs recent gem builder changes have caused some issues with
this. We are looking into it today in more detail. Pulling it down
and manually building should definitely work in the meantime.

How can I uninstall a manually installed spicycode-rcov gem? I’d like to
install it using the rubygems management tool.

gem --help
gem help commands
gem uninstall spicycode-rcov

Chad H. wrote:

Githubs recent gem builder changes have caused some issues with
this. We are looking into it today in more detail. Pulling it down
and manually building should definitely work in the meantime.

How can I uninstall a manually installed spicycode-rcov gem? I’d like to
install it using the rubygems management tool.

aslak hellesoy wrote:

How can I uninstall a manually installed spicycode-rcov gem? I'd like to
install it using the rubygems management tool.

gem --help
gem help commands
gem uninstall spicycode-rcov

I thought he meant ruby setup.rb installed it.

I would either find it and yank it out of the file system, or just
install a new
version thru gems and then see if the gems appear at the head of the
source
paths and get pulled first…

I thought he meant ruby setup.rb installed it.
Thanks for reading my message :slight_smile:

The problem is that it seems spicycode-rcov installs itself as an ersatz
of rcov with same names, so I cannot grep or locate spicycode-rcov
specific files, and I don’t want to mess up my gem system. I tried to
look at setup.rb but it’s quite big. So if anybody knows which files to
remove, please help me out.