All threads / Rails mongoid connection to remote cluster

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Rails mongoid connection to remote cluster

sommer bareen asked in Rails

I am trying to make a rails 4 application with mongodb (skipping active record). I created a cluster on https://cloud.mongodb.com, which has three hosts. The cluster is accessible in the Mongo Shell, how can I access it in rails mongoid.yml.

mongodb://sommer:[email protected]:27017,cluster0-shard-00-01-i1dxi.mongodb.net:27017,cluster0-shard-00-02-i1dxi.mongodb.net:27017/test?ssl=true&replicaSet=Cluster0-shard-0&authSource=admin

this is where i created the cluster and it is public.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 37,344+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.