使用
最初我有
Could not find an executable ["phantomjs"] on your path. (Cliver::Dependency::NotFound)
使用https://stackoverflow.com/a/31333531/849697修正了
然后
Could not find an executable 'phantomjs' that matched the requirements '>= 1.8.1', '< 3.0'. Found versions were {"/usr/bin/phantomjs"=>"127.0.0.1"}. (Cliver::Dependency::VersionMismatch)
奇怪的是,似乎给出了应该是版本的IP地址。
phantomjs
和phantomjs --version
都提供了
QXcbConnection: Could not connect to display 127.0.0.1:10.0
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
[1] 1919 abort (core dumped) phantomjs --version
(前者没有--version
)
答案 0 :(得分:0)
通过从bitbucket下载后直接安装phantomjs,phantomjs --version
正常工作,测试正在运行并按预期传递。
https://bitbucket.org/ariya/phantomjs/downloads - &gt;下载,解压缩phantomjs可执行文件,sudo mv它覆盖/usr/bin/phantomjs
sudo apt-get install phantomjs
编辑之前我正在做这个解决方法:
xvfb-run --auto-servernum bundle exec cucumber
xvfb是一个显示服务器,用于安装sudo apt-get install xvfb