title: Mongo::OperationFailure - need to login when using from_uri
body: <p>My goal is to connect with my heroku/mongolab database but I keep getting this error:</p>
  
  <pre><code>Mongo::OperationFailure at /mongotest/a/b
  : need to login
  file: networking.rb
  location: send_message_with_gle
  line: 89
  </code></pre>
  
  <p>The code I'm using is:</p>
  
  <pre><code>client = Mongo::MongoClient.from_uri(ENV['MONGOLAB_URI'])
  db   = client.db('test')
  testcoll = db['testcoll']
  testcoll.insert({:'_id' =&gt; "def", :'test' =&gt; "woop de doop"})
  testcoll.find()
  </code></pre>
  
  <p><code>ENV['MONGOLAB_URI']=mongodb://heroku_app########:password@ds0xxxxx.mongolab.com:xxxxx/heroku_app########</code></p>
  
  <p>I know that the uri is correct and contains the username and password, so why the error? Also, the error occurs on the insert() line, not the line where I authenticate.</p>