I'm using rails 5 and lastest mongoid gem, and when running mongodb server with any Model will throw this error:
MONGODB | Address family not supported by protocol family - connect(2) for [::1]:27017
I almost searched everything but I can't find any solution.
Any suggestions are much appreciated.
Just ran into this myself when upgrading the mongo gem to 2.5.0 (from 2.4.3). It looks like you can no longer connect to a Mongo instance using a domain name, in my case (and probably your's) localhost.
Change your MONGOID_HOST from localhost:27017 to 127.0.0.1:27017.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With