Ruby Mongo library returns object

Viewed 10

i am following this documentation to view the contents of my Mongodb connection through ruby. However, despite following the code snippet provided in the documentation to display a list of collections:

client = Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'test')

db.collections # returns a list of collection objects

I receive an empty output...can someone help, thanks.

0 Answers
Related