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
ruby-on-rails mongodb mongoid


source to share


No one has answered this question yet

Check out similar questions:

596
How to use problems in Rails 4
111
Invalid date format specification in gemspec
12
Rails Mongoid unable to authenticate - with error 13: "not allowed to query on my_db.my_collection"
3
New relic invoking uninitialized Mongoid :: Collection constant (NameError)
2
What is the problem with the default mongod entry in which version?
1
Getting Mongoid to work with 3 rails along the active_record side
1
As far as the concern is concerned, a mango stone is used (v3.1.4)
0
Insert many mongo - continue by mistake ruby ​​/ Ruby Mongo equivalent for mysql insert ignore
0
Rails3 / Mongoid validation not working
0
Optional :: Unknown :: options - unknown variant in mongoid rails



All Articles
Loading...
X
Show
Funny
Dev
Pics