I want to run MongoMapper on Heroku. This necessitates MongoHQ. All the documentation, like http://mongomapper.com/documentation/getting-started/rails.html, tells you to create an initializer to connect to Mongo with the MONGOHQ_URL environment variable. However, recent versions on MongoMapper don’t require an initializer, it just connects automatically now based on the content of config/mongo.yml.
Here inlies the problem: mongo.yml doesn’t seem to allow me to connect with a URL, only with host, port, etc. I tried the following and it didn’t work for me:
production:
url: <%= ENV['MONGOHQ_URL'] %>
Any other ideas on how to get this working?
(the error I get when deploying to heroku is that the app is trying to connect to localhost:27017 and failing.)
Wait I figured it out…
(uri, not url)