title: "Mongod" works, but running "rails console" results in "Failed to connect to a master node at 127.0.0.1:9100 (Mongo::ConnectionFailure)"
body: <p>I have a problem with MongoDB.</p>
  
  <p>For a start, when running <code>mongod</code>, and then <code>mongo</code> (in another teminal window), I get: </p>
  
  <pre><code>MongoDB shell version: 2.2.2
  connecting to: test
  &gt; 
  &gt; 
  </code></pre>
  
  <p>However. When I type <code>rails console</code> in my Heroku app terminal, I get:</p>
  
  <pre><code>Failed to connect to a master node at 127.0.0.1:9100 (Mongo::ConnectionFailure)
  from /Users/musetr/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo-1.6.4/lib/mongo/connection.rb:594:in `setup'
  from /Users/musetr/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo-1.6.4/lib/mongo/connection.rb:130:in `initialize'
  from /Users/mmusetr/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo_mapper-0.12.0/lib/mongo_mapper/connection.rb:79:in `new'
  from /Users/musetr/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo_mapper-0.12.0/lib/mongo_mapper/connection.rb:79:in `connect'
  from /Users/musetr/.rvm/gems/ruby-1.9.3-p327@rails3tutorial2ndEd/gems/mongo_mapper-0.12.0/lib/mongo_mapper/connection.rb:89:in `setup'
  </code></pre>
  
  <p>..
  Any help would be greatly appreciated.</p>