加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-17 01:43:33 所属栏目:百科 来源:网络整理
导读:我从OSX El Capitan更新到MacOS Sierra并开始看到PhantomJS错误. $rspec一些功能测试 …检测器# struct Cliver :: Detector command_arg = nil,version_pattern = nil未能在’/ app / node_modules / phantomjs-prebuilt / bin / phantomjs’中检测到可执行
我从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

成功.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读