This issue is lodged on the mongoid/moped account here
We can replicate this issue in development quite easily, just run rails console and type in a simple command like: 'User.count'

If in mongoid.yml we put in the hosts as mongodb:27017 and restart server, it runs on the browser, but not on console. If we put localhost:27017, it runs on console but not on browser.
There are many variations of this issue. Will update as we come across them !
EDIT 1: Adding image for the browser versio of the error.
