title: MongoDB error 'host is not a valid option for Mongo::Connection' when rails development server is starting
body: <p>I am getting an error when I start my rails development server. I run rails 3.0.6 and ruby 1.8.7 (2012-06-29 patchlevel 370) [i686-linux]</p>
  
  <p>The console output is like this when I execute rails s</p>
  
  <pre><code>=&gt; Booting Mongrel
  =&gt; Rails 3.0.6 application starting in development on http://0.0.0.0:3000
  =&gt; Call with -d to detach
  =&gt; Ctrl-C to shutdown server
  host is not a valid option for Mongo::Connection
  </code></pre>
  
  <p>My main concern is this error "host is not a valid option for Mongo::Connection". I integrate devise 1.5.2 to run Facebook, Twitter and LinkedIn login via Omniauth and this mongoDB error is appearing now. </p>
  
  <p>The GemFile I use in this Rails App.</p>
  
  <pre><code>source 'http://rubygems.org'
  
  gem 'rails', '3.0.6'
  gem 'rake', '0.8.7'
  
  gem 'mysql'
  gem 'mysql2', "0.2.11"
  
  gem 'mongrel'
  gem 'jquery-rails', '&gt;= 0.2.7' 
  gem 'active_scaffold_vho' 
  gem 'inherited_resources', '~&gt; 1.2.1' 
  gem 'has_scope', '~&gt; 0.5.0' 
  gem 'json_pure' 
  gem 'formtastic', '~&gt; 1.2.3' 
  gem "devise", "1.5.2"
  gem 'omniauth'
  gem 'omniauth-twitter'
  gem 'omniauth-facebook'
  gem 'omniauth-linkedin'
  gem 'omniauth-openid'
  gem 'recaptcha', :require =&gt; 'recaptcha/rails' 
  
  gem 'uuidtools', '~&gt; 2.1.2'
  
  gem 'capistrano', '~&gt; 2.6.0' 
  
  gem 'cgi_multipart_eof_fix'
  gem 'fastthread'
  
  gem 'mongoid', "~&gt;2.0" #Mongoid
  gem 'bson_ext', "~&gt;1.3" #Mongoid
  
  gem 'redis', "~&gt; 2.2.0"
  gem 'resque'
  gem 'resque-scheduler'
  
  gem 'SystemTimer', "~&gt; 1.2.3" 
  
  gem 'ar_mailer_rails3' 
  gem 'lazy_high_charts', "~&gt; 1.1.1" 
  
  gem 'rails-breadcrumbs', "~&gt; 1.0.0"
  
  gem 'curb' 
  
  gem 'geonames', "~&gt; 0.2.2" 
  
  gem 'activemerchant'
  
  gem 'savon', "~&gt; 0.9.7"
  
  gem 'rack-ssl'
  gem 'state_machine'
  
  gem "http_accept_language", '~&gt; 1.0.2'
  
  gem 'recurly', '~&gt; 2.1.0'
  gem 'newrelic_rpm'
  
  group :test, :development do
    gem 'rspec-rails', "~&gt; 2.8"
    gem 'rspec-mocks', "~&gt; 2.8"
    gem 'capybara', "~&gt; 0.4.1.2"
    gem 'database_cleaner', "~&gt; 0.6.7 "
    gem 'cucumber', "~&gt; 0.10.2"
    gem 'spork', "~&gt; 0.9.0"
    gem 'launchy', "~&gt; 0.4.0"
    gem 'machinist', "~&gt; 1.0.6"
    gem 'factory_girl_rails', "1.3.0"
    gem 'faker', "~&gt; 0.9.5"
    gem 'email_spec'  
    gem 'rails-erd'  
    gem 'ruby-debug'
  end
  
  group :development do
    gem "hirb"
    gem "awesome_print"
  end
  </code></pre>
  
  <p>The mongoid.yml file is as follows:</p>
  
  <pre><code>defaults: &amp;defaults
    host: localhost
    database: teenscrio
  
  development:
    &lt;&lt;: *defaults
    database: teenscrio_dev
  
  staging:
    &lt;&lt;: *defaults
    database: teenscrio_stg
  
  test:
    &lt;&lt;: *defaults
    database: teenscrio_tst
  
  # set these environment variables on your prod server
  production:
    host: &lt;%= ENV['MONGOID_HOST'] %&gt;
    port: &lt;%= ENV['MONGOID_PORT'] %&gt;
    username: &lt;%= ENV['MONGOID_USERNAME'] %&gt;
    password: &lt;%= ENV['MONGOID_PASSWORD'] %&gt;
    database: &lt;%= ENV['MONGOID_DATABASE'] %&gt;
  </code></pre>
  
  <p>Why this error is appearing now? What is the relation between devise and mongoid? How can I fix this issue?</p>