Doing a Rails project with MongoDB + MongoMapper
Rake creates the Mongo db with environment names hyphenated
ie myapp-development
which does not play well in the Mongo shell…. To edit the environment names, do I need to override the core Rails code or can it be done on a per app basis?
Else, is there a way to run commands normally on a hyphenated db name from mongo shell?
db.test.find()
returns OK
db.tests-hyphenated.find()
returns
ReferenceError: hyphenated is not defined
.
use tests-hyphenated
db.this.find()
returns OK
You can make it play in the mongo shell like this: