title: How to enable SSL/TLS in Mongoid 3 client?
body: <p>How do you enable SSL/TLS in the Mongoid 3 client?</p>
  
  <p>I've tried:</p>
  
  <pre><code>options:
    -ssl: true
  </code></pre>
  
  <p>But I get "undefined method `each_pair' for [{"ssl"=>true}]:Array (NoMethodError)":</p>
  
  <pre><code>/home/user1/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/mongoid-026e32109178/lib/mongoid/config.rb:203:in `options=': undefined method `each_pair' for [{"ssl"=&gt;true}]:Array (NoMethodError)
  from /home/jwiley/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/mongoid-026e32109178/lib/mongoid/config.rb:129:in `load_configuration'
  from /home/jwiley/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/mongoid-026e32109178/lib/mongoid/config.rb:87:in `load!'
  from /home/jwiley/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/mongoid-026e32109178/lib/mongoid.rb:98:in `load!'
  from /home/jwiley/.rbenv/versions/2.0.0-p451/lib/ruby/gems/2.0.0/bundler/gems/mongoid-026e32109178/lib/mongoid/railtie.rb:75:in `block in &lt;class:Railtie&gt;'
  </code></pre>
  
  <p>This post:</p>
  
  <p><a href="https://groups.google.com/forum/#!topic/mongoid/juexwcPWxOk" rel="nofollow">https://groups.google.com/forum/#!topic/mongoid/juexwcPWxOk</a></p>
  
  <p>...Suggests there are options you can feed into Mongoid by it's config file to make it happen.  But it's not entirely clear which options are required, and what the allowed values are.</p>