Julio Garcia Julio Garcia - 2 years ago 191
Ruby Question

MOPED: Could not resolve IP for: localhost:27017 (rails)

I am trying to learn Ruby and how to connect it to MongoDB.

I have followed everything from this video and when I'm trying to connect to localhost:3000 I get the following error

MOPED: Could not resolve IP for: localhost:27017, delta is 30.624691, error class is #<Resolv::ResolvError: Resolv::ResolvError>, retries is 0. Node is <Moped::Node resolved_address=nil> runtime: n/a

What baffles me is that it's struggling to connect to the localhost and it's driving me insane!

Can you please guide me as to how I can fix this?


PS: I'm running Rails on a Windows Machine

Answer Source

Open command prompt and run C:\mongodb\bin\mongod.exeand then open another command prompt and run C:\mongodb\bin\mongo.exe

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download