我正在尝试为使用Mongoid的写入问题设置{“w”:“most”,“j”:true},因此我们可以从日记中写入成功和良好的数据以及数据备份。虽然看起来不像我必须在两个选项之间进行选择:http://docs.mongodb.org/v2.6/reference/write-concern,但是rails服务器因以下验证错误而错误启动:
gems/optionable-0.2.0/lib/optionable/validator.rb:50:in `validate!':
{"w"=>1, "j"=>false} is not acceptable for option :write.
Valid values are: {:w=>any Integer}, {"w"=>any Integer},
{:w=>any String}, {"w"=>any String}, {:j=>true}, {"j"=>true},
{:j=>false}, {"j"=>false}, {:fsync=>true}, {"fsync"=>true},
{:fsync=>false}, {"fsync"=>false}. (Optionable::Invalid)