The supported Ruby driver connects Ruby and JRuby applications to MongoDB for CRUD, aggregation, indexes, and replica-set operation settings. Install via RubyGems.
Overview
The MongoDB Ruby driver is the officially supported client for Ruby applications talking to MongoDB. It runs on CRuby and JRuby versions listed in compatibility documentation. Install with gem install mongo or add the mongo gem to a Gemfile.
Documentation walks through connections, databases and collections, CRUD, aggregation, specialized data formats, index usage, replica-set read and write configuration, MongoDB Search, MongoDB Vector Search, monitoring, logging, and security. Release notes, upgrade guidance, and compatibility between Ruby, server, and driver versions are published separately.
Releases after a stated threshold are built and signed with the team’s GPG key; verification steps are documented for users who check gem signatures. Commercial support is available through the MongoDB Support Portal, with community forums for general technical questions.
Semantic versioning governs driver releases, with maintenance policy notes on minor releases and backported fixes. API documentation is published for each release.
Key features
- Ruby and JRuby support
- Connect and configure deployments
- CRUD operations
- Aggregation pipelines
- Index optimization guides
- Replica set CRUD configuration
- MongoDB Search queries
- Monitoring and security options
Use cases
- Ruby apps backed by MongoDB
- JRuby deployments using MongoDB
- Full-text search from Ruby
- Replica set read preference tuning
- Rails or Sinatra apps with the mongo gem