Giter VIP home page Giter VIP logo

Comments (9)

yaauie avatar yaauie commented on July 24, 2024

@mschuerig Since we use rubygems Gem::Requirement#satisfied_by? which is Ruby stdlib, your version of Ruby would be really helpful in debugging this.

from cliver.

mschuerig avatar mschuerig commented on July 24, 2024
irb(main):013:0> Cliver::VERSION
=> "0.2.2"
irb(main):016:0> RUBY_DESCRIPTION
=> "ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-linux]"

The system is a current Debian unstable/sid with phantomjs package 1.9.0-1. However, ruby as well as them gems are installed with rvm.

Here's the exception I get with Cliver.detect!

irb(main):001:0> require 'cliver'
=> true
irb(main):002:0> phantomjs_path = Cliver.detect!('phantomjs', '~> 1.8', '>= 1.8.1')
Cliver::Dependency::VersionMismatch: Could not find an executable 'phantomjs' that matched the requirements '~> 1.8', '>= 1.8.1'. Found versions were {"/usr/bin/phantomjs"=>"65"}.

from cliver.

yaauie avatar yaauie commented on July 24, 2024

65? That's odd. I think you may be hitting a bug (#5) that was resolved in cliver-0.3.x, which now favors stdout explicitly.

In jonleighton/poltergeist, I have pushed a commit that upgrades the cliver dependency to a more recent version. Can you tell me if that fixes it? If so, what is your console output of phantomjs --version 2>&1 (which forces stderr onto stdout)?

from cliver.

mschuerig avatar mschuerig commented on July 24, 2024

That version works correctly:

irb(main):002:0> Cliver::VERSION
=> "0.3.1"
irb(main):003:0> phantomjs_path = Cliver.detect!('phantomjs', '~> 1.8', '>= 1.8.1')
=> "/usr/bin/phantomjs"

Thanks!

from cliver.

yaauie avatar yaauie commented on July 24, 2024

Sweet. Thanks for working with me on that, and my apologies for the frustration.

from cliver.

cayblood avatar cayblood commented on July 24, 2024

I'm getting a similar error with 0.3.1 on ubuntu precise:

Could not find an executable 'phantomjs' that matched the requirements '~> 1.8', '>= 1.8.1'. Found versions were {"/usr/bin/phantomjs"=>"2013"}. (Cliver::Dependency::VersionMismatch)

Any idea why the version string is by year instead of normal?

from cliver.

yaauie avatar yaauie commented on July 24, 2024

@cayblood: can you give me the STDOUT and STDERR from the /usr/bin/phantomjs --version command? I'd be willing to guess that your package manager is adding some build information to the output that is colliding with cliver's search for a version number.

To get only STDOUT, do:
/usr/bin/phantomjs --version 2>/dev/null

To get only STDERR do:
/usr/bin/phantomjs --version 2>&1 >/dev/null

Once you do that, I'll open up a separate bug & solve it asap.

from cliver.

yaauie avatar yaauie commented on July 24, 2024

@cayblood I've created #11 to track progress on this, and have a small work-in-progress locally. I've also released v0.3.2, which adds a way to avoid cliver version verification by setting the environment variable CLIVER_NO_VERIFY (see diff)

from cliver.

cayblood avatar cayblood commented on July 24, 2024

Sorry for the delay here. The output from /usr/bin/phantomjs --version had an error message in it which was causing cliver parse errors. I fixed it by installing a different version of phantomjs on my system.

from cliver.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.