============
Installation
============

.. default-domain:: mongodb

The Ruby driver is bundled as a gem and is hosted on `Rubygems
<https://rubygems.org/gems/mongo>`_.

.. _ruby-driver-install:

Install the gem
---------------

The driver can be installed manually or with bundler.

To install the gem manually:

.. code-block:: sh

    gem install mongo

To install the gem with bundler, include the following in your Gemfile:

.. code-block:: ruby

    gem 'mongo', '~> 2.2'

Note the following compatibility matrix to determine if the driver is
supported on your Ruby version and MongoDB server version.

.. list-table::
   :header-rows: 1
   :widths: 28 30 30 30

   * - Ruby Version
     - MongoDB Server 2.4.x
     - MongoDB Server 2.6.x
     - MongoDB Server 3.0.x

   * - 1.8.x
     - No
     - No
     - No

   * - 1.9.x
     - Yes
     - Yes
     - Yes

   * - 2.0.x
     - Yes
     - Yes
     - Yes

   * - 2.1.x
     - Yes
     - Yes
     - Yes

   * - 2.2.x
     - Yes
     - Yes
     - Yes

   * - JRuby 1.7.x
     - Yes
     - Yes
     - Yes
============
Installation
============

.. default-domain:: mongodb

The Ruby driver is bundled as a gem and is hosted on `Rubygems
<https://rubygems.org/gems/mongo>`_.

.. _ruby-driver-install:

Install the gem
---------------

The driver can be installed manually or with bundler.

To install the gem manually:

.. code-block:: sh

    gem install mongo

To install the gem with bundler, include the following in your Gemfile:

.. code-block:: ruby

    gem 'mongo', '~> 2.4'

Remove compatibility matrix from Installation page as it has its own page
Remove compatibility matrix from Installation page as it has its own page
