I am new to Mongo and Meteor.
I have installed Meteor on Mac OSX 10.8, and I have created a new Meteor app using a collection called 'Fillup'.
I am going through some tutorials about Mongo, and I am trying to learn the shell commands, but none of them are working.
I want to use Mongo command line to view and manipulate the collection I have going in my Meteor app.
I installed Mongo seperately after Meteor, and I think Meteor might me using a different 'copy' of Mongo, because now when I try 'mongo' I get :
$ mongo
MongoDB shell version: 2.4.5
connecting to: test
Sun Jul 28 14:25:33.055 JavaScript execution failed: Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:L112
exception: connect failed
Whether Meteor is running or not, and Meteor works fine.
Meteor is using different binaries of Mongo to keep the compatible version.
If you want to test your Mongo shell commands or just play with it on the same version as Meteor, create a Meteor app and keep it running:
meteor create testapp
cd testapp
meteor
And in different shell (or tab) run
meteor mongo
The reason why it didn’t work in your case: you didn’t start the MongoDB server command mongod
. But when you run your Mongo app locally, it will run mongod
with the correct set of flags and separate database file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With