// the find
mongodb/mongo-ruby-driver
The Official MongoDB Ruby Driver
The official MongoDB driver for Ruby, published as the `mongo` gem and built on the separate `bson` gem. It is the layer under Mongoid and any other Ruby or JRuby code that talks to MongoDB directly, so it suits apps that need raw collection access, transactions, or client-side encryption without a wrapper.
- Gems released after 2.20.0 are built in CI and GPG-signed. The README gives the verification steps and explains why the team chose GPG over RubyGems' signing, which is more than most gems bother with.
- Each auth mechanism is its own conversation class under lib/mongo/auth (SCRAM-SHA-1 and SCRAM-SHA-256, x509, LDAP, GSSAPI/Kerberos, AWS), so the auth code is easy to find and audit.
- SDAM is split into one file per topology (sharded, single, replica set with and without a primary, load balanced, unknown). That mirrors the server discovery spec and makes failover behaviour traceable to specific code.
- Client-side field-level encryption has separate KMS providers for AWS, Azure, GCP, KMIP and local keys. The .evergreen directory has run scripts for Atlas, Azure, GCP, AWS auth and Lambda, plus orchestration configs for replica sets and sharded clusters.
- Bugs and feature requests go to MongoDB's Jira, not this repo's issue tracker, and filing anything requires a Jira account. The GitHub page tells an outside contributor very little about what is open or being worked on.
- The in-repo docs are mostly a pointer. Tutorials and reference moved to the separate docs-ruby repo, and the API docs come from YARD comments built with `rake docs`. Evaluating the driver from this repo alone means reading code and specs.
- The README lists Ruby 2.7-3.3 and JRuby 9.3-9.4 as supported. Check the gemspec before adopting this on a newer runtime, since the README range may lag the code.
- Only the most recent minor release is officially supported. Older 2.x lines get backports at the team's discretion, and security fixes are the most likely to qualify, so pinning to an older minor means carrying your own fixes.