Mongoid is MongoDB’s supported ODM for Ruby: model documents, connect to deployments, and integrate with Rails or Sinatra. Built on the Ruby driver.
Overview
Mongoid is an object-document mapper (ODM) framework for using MongoDB from Ruby. It is the officially supported ODM, layered on the MongoDB Ruby driver, and lets applications define flexible document models and interact with data using Ruby-native patterns.
You add Mongoid via a Gemfile or follow quick-start guides for Ruby on Rails or Sinatra. Documentation explains connecting to Atlas, Enterprise, or Community MongoDB deployments, configuring connections, modeling data, interacting with collections, in-use encryption, and third-party integrations.
Compatibility information lists supported Ruby implementations, including MRI and JRuby, and MongoDB server versions exercised in testing. User guides, API reference, and links to Ruby driver documentation are maintained alongside the framework.
Issues are tracked through MongoDB’s JIRA project for Mongoid. Community forum support is the primary channel for help.
Key features
- Object-document mapping in Ruby
- Built on MongoDB Ruby driver
- Rails and Sinatra quick starts
- Connection to Atlas or self-managed MongoDB
- Data modeling guides
- In-use encryption support
- Third-party integration docs
- MRI and JRuby compatibility
Use cases
- Ruby on Rails with MongoDB
- Sinatra apps using documents
- Flexible schema models in Ruby
- Atlas or Enterprise MongoDB backends
- Encrypted MongoDB data from Ruby apps