找不到phantomjs [英] Could not find phantomjs

查看:93
本文介绍了找不到phantomjs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Ubuntu上尝试从ruby使用phantomjs时出现以下错误:

Getting the following error when trying to use phantomjs from ruby on Ubuntu:

 Failure/Error: visit root_path
 Cliver::Dependency::NotFound:
   Could not find an executable ["phantomjs"] on your path.
 # ./spec/features/search_spec.rb:17:in `block (2 levels) in <top (required)>'
 # ./spec/support/vcr.rb:23:in `block (3 levels) in <top (required)>'
 # ./spec/support/vcr.rb:23:in `block (2 levels) in <top (required)>'

phantomjs在本地构建并添加到PATH.如何让ruby找到phantomjs?

phantomjs was built locally and added to PATH. How do I make ruby find phantomjs?

推荐答案

您也可以

$ sudo apt-get install phantomjs                               

那应该会自动将phantomjs添加到您的路径中,并执行使其正常运行所需的所有其他操作.这对我有用.

That should automatically add phantomjs to your path, and do everything else necessary for it to run correctly. This worked for me.

这篇关于找不到phantomjs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆