【问题标题】:Cliver and PhantomJS error with update to MacOS SierraCliver 和 PhantomJS 更新到 MacOS Sierra 时出错
【发布时间】:2017-03-24 13:22:52
【问题描述】:

我从 OSX El Capitan 更新到 MacOS Sierra 并开始看到 PhantomJS 错误。

$ rspec <some feature test
... The detector #<struct Cliver::Detector command_arg=nil, version_pattern=nil> failed to detect theversion of the executable at '/app/node_modules/phantomjs-prebuilt/bin/phantomjs'

我该如何解决这个问题?

【问题讨论】:

    标签: ruby-on-rails macos rspec phantomjs


    【解决方案1】:

    玩了一些之后,我意识到$ 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
    

    成功。

    【讨论】:

    • 在更新到新操作系统后非常有用,它也崩溃了,马上修复它。
    猜你喜欢
    • 1970-01-01
    • 2017-07-16
    • 1970-01-01
    • 1970-01-01
    • 2017-08-18
    • 1970-01-01
    • 2019-02-23
    • 1970-01-01
    • 2023-03-30
    相关资源
    最近更新 更多