如何在heroku上运行phantomjs? [英] how to run phantomjs on heroku?

查看:109
本文介绍了如何在heroku上运行phantomjs?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在为heroku https://github.com/stomita/heroku-buildpack-phantomjs
但是我遵循了指示,但仍然无法使其工作。
当我运行命令 heroku run bash 并输入 phantomjs --version 时,它表示 phantomjs:command not found



我读了一些关于LD_LIBRARY_PATH的内容,需要设置为/ usr / local / lib:/ usr / lib:/ lib:/ app / vendor / phantomjs / lib,这是我做的但没有成功。



有什么我缺少的东西?
buildpack在哪里安装phantomjs二进制文件?有没有办法知道二进制文件的路径?



我使用ruby 1.9.2



感谢您的帮助。

编辑:为了更加准确,我想结合ruby和phantomjs,所以我使用这个自定义buildpack: https://github.com/ddollar/heroku-buildpack-multi ,但是当我推到heroku时,我得到Heroku推送被拒绝,未能编译Multipack应用

解决方案

从phantomjs.org下载64位linux二进制文件< a href =http://phantomjs.org/download.html =noreferrer> http://phantomjs.org/download.html



在你的应用程序中创建一个bin /目录,如果你还没有的话,并将二进制文件放在那里。然后,您应该能够测试是否可以用heroku run'phantomjs'或heroku run'bin / phantomjs'运行它。


I am trying to run phantomjs on the heroku cedar stack.

I am using a phantomjs buildpack for heroku https://github.com/stomita/heroku-buildpack-phantomjs. However I followed the instructions but still cannot make it work. When I run the command heroku run bash and type phantomjs --version it says phantomjs: command not found

I read things about LD_LIBRARY_PATH that needs to be set to "/usr/local/lib:/usr/lib:/lib:/app/vendor/phantomjs/lib", this is what i did but without success.

Is there something that i am missing ? Where does the buildpack install the phantomjs binary exactly ? Is there a way to know the path where the binary is ?

I am using ruby 1.9.2

Thanks a lot for your help.

EDIT: To be more precise, i want to combine ruby and phantomjs, so i am using this custom buildpack: https://github.com/ddollar/heroku-buildpack-multi, but when i push to heroku i get "Heroku push rejected, failed to compile Multipack app"

解决方案

Download the 64-bit linux binary file from phantomjs.org here http://phantomjs.org/download.html

Create a bin/ directory in your app if you do not already have one and place the binary file there. You should then be able to test if you can run it with "heroku run 'phantomjs'" or "heroku run 'bin/phantomjs'"

这篇关于如何在heroku上运行phantomjs?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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