Skip to content

Instantly share code, notes, and snippets.

View RishiHQ's full-sized avatar

Rishi Dhanaraj RishiHQ

View GitHub Profile
@RishiHQ
RishiHQ / geckodriver-on-heroku.md
Last active October 17, 2022 15:26
How to get Firefox and geckodriver to work on Heroku

How to get Firefox and geckodriver working with Capybara on Heroku—thank me later

Why all this trouble to use Firefox/geckodriver on Heroku? I had to use Firefox and not Chrome because getting Chromedriver up with proxy credentials I think is impossible actually (not just extremely difficult).

  1. Use this Heroku buildpack to install latest Firefox.

Tip: Set your Webdriver path with Selenium::WebDriver::Firefox::Binary.path = "/app/vendor/firefox/firefox"

Tip: To only do this on production branch on Rails.env.production?