Comments (9)
@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.
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.
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.
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.
Sweet. Thanks for working with me on that, and my apologies for the frustration.
from cliver.
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.
@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.
@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.
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)
- break version detection out & make it simpler
- Favor matchier versions... HOT 2
- check_compatibility! breaks if @executables contains Pathname objects HOT 3
- Can't verify on Windows with space in pathname HOT 16
- Symlink detected as a exec HOT 5
- ArgumentError with constants HOT 1
- Cannot find phantomjs.exe on Windows HOT 16
- Add Cliver::detect
- npm phantomjs-prebuilt: "failed to detect theversion" on ubuntu hiding source error HOT 4
- Cannot find the PhantomJS.EXE file HOT 9
- Cliver unable to detect PhantamJS version on Windows machine HOT 1
- exe detected properly on windows 10 path except for the extension being in BLOCK CAPITALS HOT 5
- Switch to pure-ruby which (actually windows-like where)
- Ignore STDERR on version detection HOT 2
- Windows vs. Absolute Path HOT 1
- Clivefile & cliver executable
- cliver 0.3 broke parser HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cliver.