Docs Menu
Docs Home
/ / /
Mongoid

Quick Start - Ruby on Rails

On this page

  • Overview

This guide shows you how to use Mongoid in a new Ruby on Rails 8 (Rails) web application, connect to a MongoDB cluster hosted on MongoDB Atlas, and perform read and write operations on the data in your cluster.

To learn how to integrate Mongoid into an existing application, see the Add Mongoid to an Existing Application guide.

Tip

If you prefer to connect to MongoDB by using the Ruby driver without Mongoid, see the Ruby driver Quick Start guide.

Mongoid is an Object-Document Mapper (ODM) framework for MongoDB in Ruby. By using Mongoid, you can easily interact with your data and create flexible data models.

Ruby on Rails is a web application framework for Ruby. Rails applications use a model-view-controller (MVC) architecture that allows you to easily control how your data is modeled and displayed. Mongoid replaces the default Active Record adapter for data modeling in Rails.

To learn more about Ruby on Rails, see the Getting Started with Rails guide in the Rails documentation.

MongoDB Atlas is a fully managed cloud database service that hosts your MongoDB deployments. You can create your own free (no credit card required) MongoDB Atlas deployment by following the steps in this guide.

Follow the steps in this guide to create a sample Mongoid web application that connects to a MongoDB deployment.

Tip

Other Framework Tutorials

If you prefer to use Sinatra as your web framework, see the Quick Start - Sinatra guide.

Back

Mongoid

On this page