Skip to content

Instantly share code, notes, and snippets.

@nelhage
Created November 5, 2013 19:46
Show Gist options
  • Save nelhage/7324975 to your computer and use it in GitHub Desktop.
Save nelhage/7324975 to your computer and use it in GitHub Desktop.
[nelhage@aeronautique:~]$ pry
[1] pry(main)> require 'mongo'
=> true
[2] pry(main)> Mongo::Connection.new['nelhage']['things'].insert({'type' => 'string', :type => 'string'})
=> BSON::ObjectId('52794ae096bae530ad000001')
[3] pry(main)>
[nelhage@aeronautique:~]$ mongo nelhage
MongoDB shell version: 2.4.6
connecting to: nelhage
nelhage:PRIMARY> db.things.findOne({_id: ObjectId('52794ae096bae530ad000001')})
{
"_id" : ObjectId("52794ae096bae530ad000001"),
"type" : "string",
"type" : "string"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment