title: Unable to run Mongo shell (Mac)
body: <p>I'm new to web development and I wanted to get started with some RoR (using Locomotive CMS).</p>
  
  <p>One of the things Locomotive asks for is to have Mongodb. I installed using homebrew by following this link <a href="http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/" rel="nofollow">http://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/</a></p>
  
  <p>It installs fine but then im not able to run it!</p>
  
  <p>When I type 'mongo' on terminal I get the following output :</p>
  
  <pre><code>"MongoDB shell version: 2.4.3
  connecting to: test
  Mon May  6 11:12:28.927 
  JavaScript execution failed: 
  Error: couldn't connect to server        
  127.0.0.1:27017 at   src/mongo/shell/mongo.js:L112
  exception: connect failed"
  </code></pre>
  
  <p>BACKGROUND TO HELP DEBUGGING ( on Terminal) :</p>
  
  <p>1.When I type in mongod I get the following :</p>
  
  <pre><code>"all output going to: /usr/local/var/log/mongodb/mongo.log"
  </code></pre>
  
  <p>Ownership of mongo.log : </p>
  
  <pre><code>-rw-r--r--  1 username  admin  22133 May  6 11:13 mongo.log
  </code></pre>
  
  <p>2.When I input mongod --fork I get the following :</p>
  
  <pre><code>about to fork child process, waiting until server is ready for connections.
  forked process: 77566
  all output going to: /usr/local/var/log/mongodb/mongo.log
  ERROR: child process failed, exited with error number 100
  </code></pre>
  
  <p>3.Typing mongod --help gives the following warning:</p>
  
  <pre><code>* WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
  </code></pre>
  
  <p>4.I have a folder called data (which acts as amongodb database, is this where it should be?)in root (PATH : /data)  Ownership of data folder : </p>
  
  <pre><code> "drwxr-xr-x   3 username  wheel       102 Apr 23 21:38 data"
  </code></pre>
  
  <p>5.Checking if ports are free: lsof -i :27017. Ive also tried to check for a running mongo process using activity montior and found zilch!  </p>
  
  <pre><code>No output
  </code></pre>
  
  <p>6.Ive also tried : mongo --repair. Dint help!</p>
  
  <p>Ive been stuk on this for a while, I've looked at most responses on stackoverflow and searched around to find a solution to this but nothing has helped so far! </p>
  
  <p>UPDATE:</p>
  
  <p>When I tried to start the mongo shell, I was getting the following l
  log message from mongo.log:</p>
  
  <pre><code>5/6/13 1:33:27.616 PM com.apple.launchd: 
  (org.mongodb.mongod[79133])          
  open("/private/var/log/mongodb/output.log", ...): Permission denied
  </code></pre>
  
  <p>So I did a chmod777 for the particular folder and the shell launches! </p>
  
  <p>Although I still get a warning when it launches as:</p>
  
  <pre><code>Server has startup warnings: 
  Mon May  6 13:33:27.693 [initandlisten] 
  Mon May  6 13:33:27.693 [initandlisten] 
  ** WARNING: soft rlimits too low. 
  Number of files is 256, should be at least 1000
  </code></pre>
  
  <p>Any idea how I can silence these warnings?</p>