CHAPTER 4

image

Using MongoDB with Ruby

Ruby is an open source programming language, most commonly used in the Ruby on Rails framework. Some of the salient features of Ruby are simplicity, flexibility, extensibility, portability, and OS independent threading. The MongoDB Ruby driver may be used to connect to MongoDB server and add, fetch, and update data in the database. The Ruby diver also provides a C extension for performance. In this chapter we shall discuss using a Ruby client to access and make data changes in MongoDB. This chapter covers the following topics:

  • Getting Started
  • Using a Collection
  • Using Documents

Getting Started

In the following ...

Get Pro MongoDB™ Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.