Ruby driver for MongoDB
Type Name Latest commit message Commit time
Failed to load latest commit information.
.evergreen RUBY-1571 Freeze server and topology descriptions when lint is on (#1139 Nov 15, 2018
bin Don't make pry a gem dependency Jul 14, 2016
docs RUBY-1559 Implement uri option spec tests (#1170) Dec 13, 2018
examples Fix for index creating examples Oct 22, 2015
gemfiles minor: test kerberos with jruby (#1064) Oct 9, 2018
lib RUBY-1607 Remove :none op_msg flag (#1174) Dec 14, 2018
profile Update client and collection creation in two tasks Feb 9, 2016
spec RUBY-1607 Remove :none op_msg flag (#1174) Dec 14, 2018
.gitignore minor: ignore lockfiles in gemfiles directory Oct 9, 2018
.rspec RUBY-1597 Use a concise instafailing formatter in CI (#1166) Nov 26, 2018
.travis.yml remove unneeded travis configurations (#986) Aug 21, 2018
.yardopts Build yard docs to yard-docs and update gitignore Jul 28, 2016 minor: gemspec fixes, history, readme updates Nov 20, 2012
Gemfile RUBY-1597 Use a concise instafailing formatter in CI (#1166) Nov 26, 2018
LICENSE Update copyright year prior to release Jun 25, 2018
NOTICE minor: fixing license date per request from legal Nov 13, 2013 Update copyright year prior to release Jun 25, 2018
Rakefile RUBY-1461 Separate test user creation from test suite Sep 18, 2018
THIRD-PARTY-NOTICES RUBY-1362 Implement SASLprep for Ruby versions below 2.2 (#959) Jun 19, 2018
gem-public_cert.pem Update gem public cert Jan 17, 2018
mongo.gemspec Make bundle install work in ruby 1.9.3 Jun 5, 2018

MongoDB Ruby Driver Build Status Code Climate Gem Version

The officially supported Ruby driver for MongoDB.


High level documentation and usage examples are located here.

API docs can be found here.

Support & Feedback

For issues, questions or feedback related to the Ruby driver, please look into our support channels. Please do not email any of the Ruby developers directly with issues or questions - you're more likely to get an answer quickly on the mongodb-user list on Google Groups.

Bugs & Feature Requests

Do you have a bug to report or a feature request to make?

  1. Visit our issue tracker and login (or create an account if necessary).
  2. Navigate to the RUBY project.
  3. Click 'Create Issue' and fill out all the applicable form fields.

When reporting an issue, please keep in mind that all information in JIRA for all driver projects (ex. RUBY, CSHARP, JAVA) and the Core Server (ex. SERVER) project is PUBLICLY visible.


  • Provide as much information as possible about the issue.
  • Provide detailed steps for reproducing the issue.
  • Provide any applicable code snippets, stack traces and log data.
  • Specify version information for the driver and MongoDB.


  • Provide any sensitive data or server logs.
  • Report potential security issues publicly (see 'Security Issues').

Running Tests

The driver uses RSpec as it's primary testing tool. To run all tests simple run rspec.

If you need to run the tests without making any external connections, set the ENV variable EXTERNAL_DISABLED to 'true'.

To run a test at a specific location (where 42 is the line number), use:

rspec path/to/spec.rb:42

Security Issues

If you’ve identified a potential security related issue in a driver or any other MongoDB project, please report it by following the instructions here.

Release History

Full release notes and release history are available here.


Copyright (C) 2009-2018 MongoDB, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.