I'm trying to get a new/blank volt (0.9.5) app into production on Heroku following the instructions on the Volt docs page.
The application deploys successfully until I try and add the Mongo database.
The below creates a new MongoLab database and sets a connection URI to the MONGOLAB_URI variable.
$ heroku addons:create mongolab
I thought all I had to do was copy the below into my config/app.rb file and replace the 'MONGOHQ_URL' with 'MONGOLAB_URI'.
config.db_driver = 'mongo'
config.db_name = (config.app_name + '_' + Volt.env.to_s)
if ENV['MONGOHQ_URL'].present?
config.db_uri = ENV['MONGOHQ_URL'] # you will have to set this on heroku
else
config.db_host = 'localhost'
config.db_port = 27017
end
But this is resulting in an application error and the log is showing the below...
[ERROR] Error adding listener: #<Mongo::AuthenticationError: Failed to authenticate user
Can anyone point me in the right direction?
This isn't an answer, but you should be able to run heroku config to see what ENV's are set for the dyno. Does that show the ENV?