Forum: RSpec [RSpec] rcov and/or rexml bug?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Fernando P. (Guest)
on 2009-02-02 23:30
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:in
`wrap'
        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:in
`write_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:in
`write_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:in
`write_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:in
`write_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:in
`write_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:in
`write_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:in
`write_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:in
`write'
        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:in
`create_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:in
`each'
        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:in
`execute'
        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:in
`each'
        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.
James B. (Guest)
on 2009-02-03 15:32
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. (Guest)
on 2009-02-03 18:16
(Received via mailing list)
On Tue, Feb 3, 2009 at 7:32 AM, James B. <removed_email_address@domain.invalid>
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
James B. (Guest)
on 2009-02-03 19:10
David C. wrote:
> On Tue, Feb 3, 2009 at 7:32 AM, James B. <removed_email_address@domain.invalid>
> 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'
Fernando P. (Guest)
on 2009-02-07 18:42
David C. wrote:
> On Tue, Feb 3, 2009 at 7:32 AM, James B. <removed_email_address@domain.invalid>
> 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.
Fernando P. (Guest)
on 2009-02-07 18:55
> 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?
Fernando P. (Guest)
on 2009-02-07 19:06
> 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:

4) 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.
Rob S. (Guest)
on 2009-02-12 07:31
(Received via mailing list)
On Sat, Feb 7, 2009 at 12:06 PM, Fernando P. 
<removed_email_address@domain.invalid>
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

http://thinkrelevance.com
http://runcoderun.com
Fernando P. (Guest)
on 2009-02-13 11:01
> 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?
Chad H. (Guest)
on 2009-02-13 15:46
(Received via mailing list)
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
Fernando P. (Guest)
on 2009-04-16 17:36
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 H. (Guest)
on 2009-04-16 18:02
(Received via mailing list)
On Thu, Apr 16, 2009 at 3:36 PM, Fernando P.
<removed_email_address@domain.invalid>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
Phlip (Guest)
on 2009-04-16 18:06
(Received via mailing list)
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...
Fernando P. (Guest)
on 2009-04-16 18:30
> I thought he meant ruby setup.rb installed it.
Thanks for reading my message :-)

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.
This topic is locked and can not be replied to.