MacOS Sierra更新后,Ruby on Rails如何解决Cliver和PhantomJS错误?

2026-04-10 06:521阅读0评论SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计268个文字,预计阅读时间需要2分钟。

MacOS Sierra更新后,Ruby on Rails如何解决Cliver和PhantomJS错误?

我使用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

去掉它:

MacOS Sierra更新后,Ruby on Rails如何解决Cliver和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

成功.

本文共计268个文字,预计阅读时间需要2分钟。

MacOS Sierra更新后,Ruby on Rails如何解决Cliver和PhantomJS错误?

我使用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

去掉它:

MacOS Sierra更新后,Ruby on Rails如何解决Cliver和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

成功.