mapreduce using rails and mongo