[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Error while building ruby-capybara



Hi,

On Fri, Jan 04, 2019 at 12:03:25AM +0530, Utkarsh Gupta wrote:
> Hey,

> I am updating *ruby-capybara *[1]. While building the package, I got a
> similar error in 21 files.

> A single set of the error can be found here:
> https://paste.debian.net/1058479/

> The complete logs (for all 21 files) can be found here:
> https://paste.debian.net/1058477/

The links you sent do not show any data. They must have had a (short)
lifespan. I tried to build capybara. The error I saw 21 times looks
like:

An error occurred while loading ./spec/xpath_builder_spec.rb.
Failure/Error:
  x.ancestor_or_self[
    x.attr(:style)[x.contains('display:none') | x.contains('display: none')] |
    x.attr(:hidden) |
    x.qname.one_of('script', 'head')
  ].boolean

NoMethodError:
  undefined method `ancestor_or_self' for XPath:Module
  Did you mean?  ancestors
# ./lib/capybara/node/simple.rb:190:in `block in <class:Simple>'
# ./lib/capybara/node/simple.rb:189:in `<class:Simple>'
# ./lib/capybara/node/simple.rb:15:in `<module:Node>'
# ./lib/capybara/node/simple.rb:4:in `<module:Capybara>'
# ./lib/capybara/node/simple.rb:3:in `<top (required)>'
# ./lib/capybara.rb:448:in `<module:Capybara>'
# ./lib/capybara.rb:9:in `<top (required)>'
# ./lib/capybara/spec/spec_helper.rb:5:in `<top (required)>'
# ./spec/spec_helper.rb:4:in `<top (required)>'
# ./spec/xpath_builder_spec.rb:3:in `<top (required)>'

> What could be the correct workaround for the same?

the name suggests that it is related to ruby-xpath, providing the XPath
module. The current version 2.0.0 of ruby-xpath doesn't provide the
ancestor_or_self method. But the 3.2 version does. Looking at the
capybara.gemspec file, I could find the indicated minimal version
required. So in order to fix the issue, you need to prepare a new
version of ruby-xpath (>= 3.2).

Cheers,

Cédric

Attachment: signature.asc
Description: PGP signature


Reply to: