The Ruby driver is released as a gem hosted on Rubygems.
Please see the compatibility page for the list of Ruby versions and MongoDB server versions that this release of the Ruby driver is compatible with.
The driver itself is written entirely in Ruby, however it depends on the
bson library which includes a C extension
for MRI and a compiled Java extension for JRuby. A working C compiler and Ruby
development headers and libraries are required when installing on MRI.
When installing on JRuby, JRE is sufficient because the
bson gem includes
the compiled extension.
Connecting to TLS-enabled MongoDB servers, using SCRAM authentication
(both SCRAM-SHA-1 and SCRAM-SHA-256) and using X.509 authentication (which
is performed over a TLS connection) requires the Ruby
to be present and working. The TLS compatibility
section provides further details on usage of newer TLS protocols like TLS 1.1.
mongo to your
gem "mongo", "~> 2"
To install the driver manually:
gem install mongo -v '~> 2'