Mongoid's strange behaviour in production: it says it saved the record, but it did not appear in db?

True is returned when validation is successful not necessarily persistence to mongodb.

True is returned when validation is successful, not necessarily persistence to mongodb. Most drivers by default (not sure about Mongoid) write to mongo in a 'fire and forget' manner and don't wait to get a response from the server as to whether there was a problem saving the record or not. You can turn on 'safe mode' by default at mongoid.org/docs/installation/configurat... which will have the driver block until changes are persisted instead of 'firing and forgetting'.

Perhaps you are hitting an error on the server which you miss because the driver/mongoid is just not waiting for a response (unsafe write).

Well, in console everithing is still the same (creates and even tells that the title is taken if trying to create another one with the same title, though I still can't find it in db), but in web interface I get now new, very-very strange error: Mongo::OperationFailure (: Modifier spec implies existence of an encapsulating object with a name that already represents a non-object, or is referenced in another $set clause): app/controllers/equipment_controller. Rb:51:in create' ` – Yuri Grechka Apr 11 at 8:38 I configured it. Somehow I've got old version of mongod -- 1.2.2, so I had to update to 1.8.1 and everything now works fine.

Thank you! – Yuri Grechka Apr 11 at 9:13.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions