0

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!

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.