How to configure mangoid 1.9.2 on herook?

I have a rails 2.3.8 application running on heroku, but I have problems setting up mongoid 1.9.2 with MongoHQ. Has anyone done this job?

Thank!

+3
source share
1 answer

To connect to the database, you must use a variable MONGODB_URL.

# set these environment variables on your prod server
production:
  <<: *defaults
  uri: <%= ENV['MONGOHQ_URL'] %>

Also, make sure the property is hostnot set to defaultsnode. strong text

defaults: &defaults
  # slaves:
  #   - host: slave1.local
  #     port: 27018
  #   - host: slave2.local
  #     port: 27019
+3
source

Source: https://habr.com/ru/post/1776147/


All Articles