adding mongo to path
- by Mike
Bit of a noob question. I have downloaded MongoDb and installed it here
/Users/mike/downloads/mongodb
In order to start it, I then have to 'cd' into the 'bin'
/Users/mike/downloads/mongodb/bin
and run
./mongod (to start the database)
and
./mongo (to start the mongo shell)
The problem is that I can only work with python and ruby scripts using the mongo shell if I have those scripts stored in the same bin directory, and I don't think that's the ideal set up.
Will exporting the path allow me to access mongo from outside the bin? For example, I would prefer to have my ruby scripts in /sites/ruby and be able to access mongo by starting ruby in /sites/ruby. If exporting to path is the solution, how do I do that. I'm using a mac