I had to forcefully shutdown my Ubuntu system after it got hanged. Now I get this error while trying to run my Rails app.
Moped::Er
Uninstall mongodb using
sudo apt-get autoremove mongodb-*
then install with
apt-get install mongodb-server
run mongo
it will solve the problem
I was able to get it working by removing the mongod.lock file and restarting mongodb service
sudo rm /var/lib/mongodb/mongod.lock
sudo service mongodb start