Ruby MongoDB Driver
Welcome to the documentation site for the official MongoDB Ruby driver. You can add the driver to your application to work with MongoDB in Ruby.
Get Started
To get started with the Ruby driver, see Installation and Ruby Driver Quick Start. Continue to Tutorials for high level documentation for common operations.
BSON
The Ruby BSON implementation is packaged in a separate gem with C and Java extensions for speed depending on the runtime environment.
For reference on the Ruby BSON gem, see the BSON Tutorial.
Object Mappers
Because MongoDB is so easy to use, the basic Ruby driver can be the best solution for many applications. But if you need validations, associations, and other high-level data modeling functions, then you may need Object Document Mapper.
In the context of a Rails application, an Object Document Mapper provides functionality equivalent to, but distinct from, ActiveRecord. Because MongoDB is a document-based database, these mappers are called Object Document Mappers (ODM) as opposed to Object Relational Mappers (ORM).
The ODM officially supported by MongoDB is Mongoid, originally written by Durran Jordan.
For tutorials on Mongoid, see the Mongoid Manual.