A long-lived project that still receives updates
A Ruby gem that automatically downloads and installs ChromeDriver binaries that match your installed Chrome browser version.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 13.0
~> 3.0
~> 1.21
~> 0.22
~> 1.9

Runtime

~> 2.4
 Project Readme

chromedriver-binary

A Ruby gem that automatically downloads and installs ChromeDriver binaries that match your installed Chrome browser version.

Inspired by webdrivers

Features

  • Automatically detects Chrome browser version
  • Downloads the matching ChromeDriver version
  • Works across Windows, macOS, and Linux platforms
  • Supports environment variable configuration
  • Minimal dependencies

Installation

Add this to your application's Gemfile:

gem 'chromedriver-binary'

And then execute:

$ bundle install

Or install it yourself:

$ gem install chromedriver-binary

Usage

Simply require the gem in your code:

require 'chromedriver/binary'

Chromedriver::Binary.configure do |config|
  # default STDOUT logger
  config.logger = logger

  # Proxy default nil
  config.proxy_addr = 'myproxy_address.com'
  config.proxy_port = '8080'
  config.proxy_user = 'username'
  config.proxy_pass = 'password'

  # install dir
  config.install_dir = "/tmp" # default "~/.webdrivers"
end

Chromedriver::Binary::ChromedriverDownloader.update force: true

Chromedriver::Binary::ChromedriverDownloader.driver_path

Rake Tasks

require "chromedriver/binary"

load 'chromedriver/Rakefile'

The gem will:

  1. Detect your installed Chrome version
  2. Download the matching ChromeDriver binary if needed
  3. Make it available in your PATH

Configuration

Use environment variables to customize behavior:

  • CHROMEDRIVER_CHROME_PATH: Specify the Chrome binary location
  • CHROMEDRIVER_BINARY_PATH: Override where ChromeDriver is installed

Development

After checking out the repo:

$ bin/setup               # Install dependencies
$ rake spec               # Run the tests
$ bundle exec rake install # Install the gem locally

License

The gem is available as open source under the terms of the MIT License.