I installed MongoDb yesterday on a Mac Snow Leopard and got the following error message
Mongo::ConnectionFailure: Failed to connect to a master node at localhost
It's not running mongod. You need to start it, probably with a script so you can control how it starts. The script I use on my mac looks like: mongod -f /etc/mongodb.conf &
.
At this point I can't remember if the install came with /etc/mongodb.conf, or if I put it there myself. It's fairly simple. I store my data/log in my user folder (this is obviously a development environment):
dbpath = /Users/me/data/
logpath = /Users/me/mongo.log
# Only accept local connections
bind_ip = 127.0.0.1
You'll also need to create your data folder, if it doesn't exist.