Navigation

Installation

Install the Gem

Mongoid is bundled as a gem, and is hosted on Rubygems. It can be installed manually or with bundler.

To install the gem manually:

gem install mongoid

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

gem 'mongoid', '~> 7.0'

Compatibility

Note the following compatibility matrix to determine if Mongoid is compatible with your Ruby version and MongoDB server. Note that Mongoid is currently compatible with Rails 5 and depends on ActiveModel 5.1 or higher, and thus requires Ruby 2.2.2 or higher.

Ruby Version MongoDB 4.0.x MongoDB 3.6.x MongoDB 3.4.x MongoDB 3.2.x MongoDB 3.0.x
MRI 2.5.0+ Yes Yes Yes Yes Yes
MRI 2.4.1+ Yes Yes Yes Yes Yes
MRI 2.3.x Yes Yes Yes Yes Yes
MRI 2.2.2+ Yes Yes Yes Yes Yes
MRI 2.1.x No No No No No
JRuby 9.2.x Yes Yes Yes Yes Yes
JRuby 9.1.x Yes Yes Yes Yes Yes

Refer to Rails considerations for the Ruby on Rails compatibility matrix.

←   Mongoid Configuration  →