如何在Mongoid 3客戶端啓用SSL/TLS?如何在Mongoid 3客戶端啓用SSL/TLS?
我試着:
options:
-ssl: true
但是我得到 「未定義的方法`each_pair」的[{ 」SSL「=>真}]:陣列(NoMethodError)」:
/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"=>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 <class:Railtie>'
這個帖子:
https://groups.google.com/forum/#!topic/mongoid/juexwcPWxOk
...:建議有,你可以通過它送入Mongoid選項的配置文件來實現它。但是不清楚哪些選項是必需的,以及允許的值是什麼。