[英]MOPED: Could not resolve IP for: localhost:27017 (rails)
I am trying to learn Ruby and how to connect it to MongoDB. 我正在尝试学习Ruby,以及如何将其连接到MongoDB。
I have followed everything from this video and when I'm trying to connect to localhost:3000 I get the following error 我已经关注了该视频中的所有内容,当我尝试连接到localhost:3000时,出现以下错误
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? 您能指导我如何解决此问题吗?
Thanks! 谢谢!
PS: I'm running Rails on a Windows Machine PS:我在Windows计算机上运行Rails
打开命令提示符并运行C:\\mongodb\\bin\\mongod.exe
,然后打开另一个命令提示符并运行C:\\mongodb\\bin\\mongo.exe
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.