Mongoid write about problems with w and j parameters

I am trying to configure as {"w": "most", "j": true} for a write problem using Mongoid, so we can write successful and good data, and also back up data from the logs. While it doesn't seem like I have to choose between two options: http://docs.mongodb.org/v2.6/reference/write-concern , the rails server threw an error for the following validation error:

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)

      

+3


source to share





All Articles