Created
January 6, 2012 12:50
-
-
Save sivakumarbdu/1570475 to your computer and use it in GitHub Desktop.
Connect to Mongo DB from ruby
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'mongo' | |
dbase = Mongo::Connection.new("localhost",27017).db("person") | |
person_collection = db.collection("interest") | |
person_collection.find().each do |row| | |
p row.inspect | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment