phantomjs-gem
phantomjs-gem copied to clipboard
Cliver::Dependency::NotFound: Could not find an executable ["phantomjs"] on your path
Doesn't work on ubuntu 😢
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial
Cliver::Dependency::NotFound: Could not find an executable ["phantomjs"] on your path.
/var/lib/gems/2.3.0/gems/cliver-0.3.2/lib/cliver/dependency.rb:143:in `raise_not_found!'
/var/lib/gems/2.3.0/gems/cliver-0.3.2/lib/cliver/dependency.rb:116:in `detect!'
/var/lib/gems/2.3.0/gems/cliver-0.3.2/lib/cliver.rb:24:in `detect!'
/var/lib/gems/2.3.0/gems/poltergeist-1.16.0/lib/capybara/poltergeist/client.rb:51:in `initialize'
/var/lib/gems/2.3.0/gems/poltergeist-1.16.0/lib/capybara/poltergeist/client.rb:14:in `new'
/var/lib/gems/2.3.0/gems/poltergeist-1.16.0/lib/capybara/poltergeist/client.rb:14:in `start'
/var/lib/gems/2.3.0/gems/poltergeist-1.16.0/lib/capybara/poltergeist/driver.rb:44:in `client'
/var/lib/gems/2.3.0/gems/poltergeist-1.16.0/lib/capybara/poltergeist/driver.rb:25:in `browser'
/var/lib/gems/2.3.0/gems/poltergeist-1.16.0/lib/capybara/poltergeist/driver.rb:97:in `visit'
/var/lib/gems/2.3.0/gems/capybara-2.15.1/lib/capybara/session.rb:269:in `visit'
/home/ubuntu/repos/slack-queries/lib/tasks/sand.rake:7:in `block in <top (required)>'
/var/lib/gems/2.3.0/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
Tasks: TOP => sand
Sounds like there are issues with Phantom 2.1 and Ubuntu 16.04
https://github.com/ariya/phantomjs/issues/14376
There is a 2.5 beta out with binaries for xenial
https://bitbucket.org/ariya/phantomjs/downloads/
There is work on making a gem of the 2.5 beta in #97, but I couldn't find a way to make it work for both trusty and xenial.
This SO answer worked for me https://stackoverflow.com/a/64137884/6488361