I’ve been trying to use Mongoid with Rails on Ubuntu. I have installed mongoDB via apt-get. But when I try to run the rails server, I get this error:
/home/myusername/.rvm/gems/ruby-1.9.2-p180@mysite/gems/mongo-1.3.1/lib/mongo/connection.rb:518:in
`connect’: Failed to connect to a
master node at localhost:27017
(Mongo::ConnectionFailure)
I am just new to using Mongoid, any help will be appreciated. Thanks a lot in advance!
As Piotr says you need to start the Mongo DB server. If you want to quickly test this, run
mongodfrom a shell.