I've been trying to use Mongoid with Rails on Ubuntu. Mongodb was working fine for me with rails app 3.0 to 3.2,
today suddenly, i am getting error "/home/pravinmishra/.rvm/gems/ruby-1.9.2-p318/gems/mongo-1.5.2/lib/mongo/connection.rb:413:in `connect': Failed to connect to a master node at localhost:27017 (Mongo::ConnectionFailure)"
Many times i face this issues, and below commands works for me.
sudo rm /var/lib/mongodb/mongod.lock
sudo -u mongodb mongod -f /etc/mongodb.conf --repair
sudo start mongodb
sudo status mongodb
when i m connecting from ubunto termial using mongo then getting error "MongoDB shell version: 2.0.1 connecting to: test Mon Jul 9 22:47:06 Error: couldn't connect to server 127.0.0.1 shell/mongo.js:84 exception: connect failed "
any suggestion would be appreciated, thanks in advance..!!