简体   繁体   English

MOPED:无法为以下地址解析IP:localhost:27017(导轨)

[英]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.

相关问题 无法连接到主节点以获取副本集 <Moped::Cluster nodes=[<Moped::Node resolved_address=“127.0.0.1:27017”> ]&gt; - Could not connect to a primary node for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address=“127.0.0.1:27017”>]> 无法连接到副本集#的主节点 <Moped::Cluster[<Moped::Node resolved_address=“10.10.4.131:27017”> ] - Could not connect to a primary node for replica set #<Moped::Cluster[<Moped::Node resolved_address=“10.10.4.131:27017”>] 如何在Rails应用中救援Moped :: Errors :: ConnectionFailure? - How rescue Moped::Errors::ConnectionFailure in rails app? Rails:本地主机工作,但内部IP被拒绝 - Rails: localhost works, but internal IP refused 与 Rails 7 反应:无法解析“../components/EditTopic” - React with Rails 7: Could not resolve "../components/EditTopic" Moped :: Errors :: ConnectionFailure:无法连接到任何辅助或主节点 - Moped::Errors::ConnectionFailure: Could not connect to any secondary or primary nodes 用Moped :: BSON :: ObjectId或String作为Rails模型中父代的ID? - Moped::BSON::ObjectId or String for parent's id in Rails models? Rails在生产中生成错误的资产url(使用localhost而不是服务器ip) - Rails generates wrong asset url in production (with localhost instead of server ip) 使用本地主机而不是远程IP主机的Rails连接到mysql2 - Rails using localhost instead of remote ip host to connect to mysql2 如何解决这个问题 - 无法解决 Rails 中的“app/javascript/*.*”问题 - How to solve this - Could not resolve "app/javascript/*.*" issue in Rails
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM