2017-08-02 75 views
0

部署在Heroku上一个Ruby应用程序嗨,我有些麻烦来部署使用西纳特拉和宝石的Watir Heroku上我的Ruby应用程序。 我必须加载铬窗口,这就是为什么我读的消息:如何使用西纳特拉和宝石的Watir

"Application error An error occurred in the application and your page could not be served."

我尝试启动我的本地主机上的应用程序,它完美地工作,而不是在Heroku。

我安装了此chrome驱动程序buildpack https://github.com/heroku/heroku-buildpack-chromedriver 和此https://github.com/heroku/heroku-buildpack-xvfb-google-chrome

我也做了以下的步骤"Only supported on Cedar-14 Note that this buildpack only works on Cedar-14 stack."

我生成日志告诉我的应用程序在Heroku上部署没有问题。 这是我第一次部署在网络的应用程序,我真的需要使用Heroku的,如果有可能。

我已经尝试另一种方式来部署我的应用程序,而无需驾驶员铬buildpacks,和它完美的作品。显然,在我的程序中使用Watir宝石的部分无论如何都不起作用。

回答

0

我不知道的Heroku如何与运行Chrome,但你可以使用webdrivers宝石获得工作chromedriver。另外,如果安装了xvfb,则易于使用headless宝石。

+0

我放弃的Heroku的想法,对于ScaleWay托管,在这种情况下,我必须使用无头宝石和安装xvfb的! 感谢对你的答案,谁给了我无头宝石的存在! –