在Heroku Rails独角兽堆栈中使用无头浏览器 [英] Using a headless browser with Heroku Rails Unicorn stack

查看:107
本文介绍了在Heroku Rails独角兽堆栈中使用无头浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

h2_lin>解决方案

是的,有人已经编写了一个包含PhantomJS的构建包(互联网和开源非常棒)。你希望在Heroku dyno上运行无头PhantomJS,你需要:



多buildpack必须配置作为正式的Heroku buildpack。然后您需要将其他两个buildpack URL添加到 .buildpacks 文件中。在上面的链接中有关于配置每个buildpack的更多详细信息。



使用这个,您应该能够部署您的Rails应用程序,运行您的PhantomJS代码/测试,全部一个单一的dyno无头。

I have seen posts that you can change the build on Heroku, to use PhantomJS with the Cedar stack, but is it possible to run a headless browser on the unicorn stack?

解决方案

Yes, and someone already wrote a buildpack for including PhantomJS (the internet and open source are amazing).

If you want to run headless PhantomJS on a Heroku dyno, you will need to:

The multi buildpack must be configured as the official Heroku buildpack. You then need to add the other two buildpack URLs to the .buildpacks file. There are additional details for configuring each buildpack at the links above.

Using this, you should be able to deploy your Rails app, run your PhantomJS code/tests, all on a single dyno headlessly.

这篇关于在Heroku Rails独角兽堆栈中使用无头浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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