如何解决在MacOS Sierra更新Ruby on Rails时遇到的Cliver和PhantomJS问题?
- 内容介绍
- 文章标签
- 相关推荐
本文共计250个文字,预计阅读时间需要1分钟。
从OS X El Capitan升级到MacOS Sierra后,开始遇到PhantomJS错误。使用$ rspec进行功能测试时出现问题。
我从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
成功.
本文共计250个文字,预计阅读时间需要1分钟。
从OS X El Capitan升级到MacOS Sierra后,开始遇到PhantomJS错误。使用$ rspec进行功能测试时出现问题。
我从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
成功.

