当前位置 : 主页 > 编程语言 > ruby >

ruby-on-rails – 更新到MacOS Sierra时出现Cliver和PhantomJS错误

来源:互联网 收集:自由互联 发布时间:2021-06-23
我从OSX El Capitan更新到MacOS Sierra并开始看到PhantomJS错误. $rspec一些功能测试 …检测器# struct Cliver :: Detector command_arg = nil,version_pattern = nil未能在’/ app / node_modules / phantomjs-prebuilt / bin / p
我从OSX El Capitan更新到MacOS Sierra并开始看到PhantomJS错误.

$rspec<一些功能测试
…检测器#< struct Cliver :: Detector command_arg = nil,version_pattern = nil>未能在’/ app / node_modules / phantomjs-prebuilt / bin / phantomjs’中检测到可执行文件的版本

我该如何解决这个问题?

经过一番游戏,我意识到$phantomjs –version没有返回任何东西.奇怪.我也检查了两个

$brew list
$npm ls

并且看到他们都没有将phantomjs列为他们的一个包裹.看起来我的phantomjs安装有问题.我决定全新安装phantomjs.

我首先确定了phantomjs的安装位置:

$which phantomjs
/usr/local/bin/phantomjs

去掉它:

$rm -rf /usr/local/bin/phantomjs
$phantomjs -v
-bash: /usr/local/bin/phantomjs: No such file or directory

好.现在用npm安装phantomjs:

$npm -g install phantomjs-prebuilt
$phantomjs -v
2.1.1

这很有希望.让我们再次运行我们的规范:

$rspec <some feature test>
1 example, 0 failures

成功.

网友评论