I have two databases that I have to use in my application. I have the following in my mongoid.yml:
development:
# Configure available data
In order to access a database temporarily (e.g. in a script) you can use the MongoDB Ruby drivers: Tutorials - Documentation - Low Level Documentation
For a quick overview:
Connect to the database:
client = Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'my_db')
db = client.database
Query for entries via mongoDB query syntax:
db['collection_name'].find('field_name' => 'field_value')