Mongoid
Introduction
Welcome to the documentation site for Mongoid. Mongoid is the officially supported object-document mapper (ODM) for MongoDB in Ruby. By using Mongoid, you can easily interact with your data and create flexible data models native to Ruby applications.
You can add Mongoid to your Ruby application to connect it to
a MongoDB database. Install Mongoid by adding it to your project's
Gemfile
or set up a runnable project by following one of the
Quick Start guides.
Connect to a Compatible MongoDB Deployment
You can use Mongoid to connect to MongoDB deployments running on one of the following hosted services or editions:
MongoDB Atlas: the fully managed service for MongoDB deployments in the cloud
MongoDB Enterprise: the subscription-based, self-managed version of MongoDB
MongoDB Community: the source-available, free-to-use, and self-managed version of MongoDB
Quick Start
Learn how to establish a connection to MongoDB Atlas and begin working with data by following one of the following guides:
Configuration
To learn how to configure different options in your Mongoid application, see the Configuration section.
Interact with Data
To learn how to use Mongoid to interact with your MongoDB data, see the Interact with Data section.
Model Your Data
To learn how to model your MongoDB data as Mongoid models, see the Model Your Data section.
Secure Your Data
To learn how to secure your data by using encryption, see the Secure Your Data section.
Integrations & Tools
To learn how to add Mongoid to an existing application, see the Integrations & Tools section. This section also includes information about the Ruby on Rails framework and other resources.
Compatibility
To learn about the versions of the MongoDB Server, the Ruby language, the Ruby driver, and Ruby on Rails framework that are compatible with each version of Mongoid, see Compatibility.
What's New
To view a list of new features and changes in each version, see the What's New section.
Issues & Help
To find resources for troubleshooting and to learn about contributing to Mongoid, see Issues & Help.