Most importantly, note that
db.ratings.aggregate has not a thing to do with meteor or meteor-mongo-extensions . Mongo itself has a native
db.<collection>.aggregate() function. So thats why it works in the shell.
Now for Meteor. Meteor uses a custom mongo driver so it can set up all the nice reactive aspects in Meteor.Collection(), among other things. As such, some of the mongo functions have not yet been implemented.
And finally meteor-mongo-extensions, that is effectively a hack of a hack. I have yet to confirm it I believe the issue can be found in this Github issue. Try to run this on the server outside the meteor method, just to be sure.