Navigation
This version of the documentation is archived and no longer supported.

Installation

The Ruby driver is bundled as a gem and is hosted on Rubygems.

Install the Gem

The driver can be installed manually or with bundler.

To install the mongo gem manually:

gem install mongo -v 2.12.4

What’s New

Please consult the releases page on GitHub for the list of improvements and changes in each version of the driver.

TLS/SSL and the Ruby Driver

Industry best practices, and some regulations, require the use of TLS 1.1 or newer. Though no application changes are required for the Ruby driver to make use of the newest protocols, some operating systems or versions may not provide an OpenSSL version new enough to support them.

Users of macOS older than 10.13 (High Sierra) will need to install Ruby from rvm, homebrew, macports, or another similar source. See installation information on ruby-lang.org for more options.

Users of Linux or other non-macOS Unix can check their OpenSSL version like this:

$ openssl version

If the version number is less than 1.0.1 support for TLS 1.1 or newer is not available. Contact your operating system vendor for a solution or upgrade to a newer distribution.

You can check your Ruby interpreter by executing the following command:

ruby -e "require 'net/http'; require 'json'; puts JSON.parse(Net::HTTP.get(URI('https://www.howsmyssl.com/a/check')))['tls_version']"

You should see “TLS 1.X” where X is >= 1.

You can read more about TLS versions and their security implications here:

https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet#Rule_-_Only_Support_Strong_Protocols