title: mongoid with rails - Database should be a Mongo::DB, not NilClass"
body: <p>Greetings</p>
  
  <p>I am trying to get Mongoid to work with my Rails app and I am getting 
  an error: <code>"Mongoid::Errors::InvalidDatabase in 'Shipment bol should be 
  unique'  Database should be a Mongo::DB, not NilClass"</code>
  I have created the mongoid.yml file in my config directory and have  mongodb running as a daemon.  The config file is like so: </p>
  
  <pre><code>defaults: &amp;defaults  
  host: localhost 
  
  development:  
    &lt;&lt;: *defaults  
    database: ship-it-development 
  
  test:  
    &lt;&lt;: *defaults  
    database: ship-it-test 
  
  production: 
    &lt;&lt;: *defaults  
    host: &lt;%= ENV['MONGOID_HOST'] %&gt;  
    port: &lt;%= ENV['MONGOID_PORT'] %&gt;  
    database: &lt;%= ENV['MONGOID_DATABASE'] %&gt;
  </code></pre>
  
  <p>All of my specs fail with the above error. I am using rails 2.3.8.</p>
  
  <p>Anyone have ideas?</p>