How to deploy a Ruby app on Heroku using Sinatra and Watir gem

175 Views Asked by At

Hi i've some trouble to deploy my Ruby application on Heroku using Sinatra and Watir gem. I have to load a chrome window, that's why i read the message:

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

I tried to launch my app on localhost, it work perfectly, but not on Heroku.

I installed this chrome driver buildpack https://github.com/heroku/heroku-buildpack-chromedriver and this https://github.com/heroku/heroku-buildpack-xvfb-google-chrome.

I've also done the following step "Only supported on Cedar-14 Note that this buildpack only works on Cedar-14 stack."

My build log tell that my app is deploy on Heroku without problem. It's the first time i deploy an application on web, and i really need to use Heroku if it's possible.

I've try another way to deploy my app, without chrome driver buildpacks, and it works perfectly. Obviously, the part that uses the Watir gem, in my program doesn't work anyway.

1

There are 1 best solutions below

1
On

I'm not sure how heroku works with running chrome, but you can get a working chromedriver using the webdrivers gem. Also if xvfb is installed, it is easy to use the headless gem.