Skip to content

Instantly share code, notes, and snippets.

@chadwpry
Created May 21, 2010 21:11
Show Gist options
  • Select an option

  • Save chadwpry/409443 to your computer and use it in GitHub Desktop.

Select an option

Save chadwpry/409443 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'mongo'
USER = 'tiger'
PASS = 'censusTIGER2009'
db = Mongo::Connection.new('flame.mongohq.com', 27058).db('tiger-2009')
db.authenticate(USER, PASS)
taken from http://www.mongodb.org/display/DOCS/Ruby+Tutorial#RubyTutorial-MakingaConnection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment