gerky
gerky

Reputation: 6415

Problem with Mongo DB using Mongoid Gem

I'm developing on Ubuntu, I have installed the mongoid gem, and when I run the rails server, I get this error

/home/username/.rvm/gems/ruby-1.9.2-p180/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 remembered using a command like brew install but I am pretty clueless. Am I missing something? Thanks in advance!

Upvotes: 0

Views: 587

Answers (2)

han
han

Reputation: 1

other possibility you didnt start the server(which should auto-start usually)

mongod also has this weirdness

try to run sudo mongod in a foreground process and the messages should tell you how to recover

Upvotes: 0

Dylan Markow
Dylan Markow

Reputation: 124469

You need to have MongoDB installed, too. Since you're on Ubuntu, try this:

sudo apt-get install mongodb

If you saw any brew commands in any instructions you were reading, those were likely for Homebrew on Mac OS X, not for Ubuntu.

Upvotes: 2

Related Questions