I recently upgraded from mongoid 2.0.2 to mongoid 3 with rails 3.2.12 and ruby 1.9.3 .
Following issue comes when save command excutes => @new_node.save
Moped::Errors::OperationFailure (The operation: #<Moped::Protocol::Command
@length=366
@request_id=30
@response_to=0
@op_code=2004
@flags=[:slave_ok]
@full_collection_name="campus_dev.$cmd"
@skip=0
@limit=-1
@selector={:aggregate=>"nodes", :pipeline=>[{"$match"=>{"parent_id"=>"51382df8851d1912b7000009", "_id"=>{"$ne"=>"513f24952f1feda4bc000002"}, "position"=>{"$nin"=>[nil]}}}, {"$group"=>{"_id"=>"position", "count"=>{"$sum"=>1}, "max"=>{"$max"=>"$position"}, "min"=>{"$min"=>"$position"}, "sum"=>{"$sum"=>"$position"}, "avg"=>{"$avg"=>"$position"}}}]}
@fields=nil>
failed with error "no such cmd"):
app/controllers/nodes_controller.rb:37:in `create'