actualmente estoy usando los siguientes ajustes (que no trabajan) en mi mongoid.yml y he añadido correctamente la variable ambiental MONGOLAB_URI
a mi entorno heroku:¿Por qué mi mongoDB hosting configuraciones uri para mongoid.yml no funciona correctamente?
production:
sessions:
default:
another:
uri: <%= ENV['MONGOLAB_URI'] %>
también probé el siguiente la que no funciona:
production:
uri: <%= ENV['MONGOLAB_URI'] %>
Esto también no funciona:
production:
sessions:
default:
uri: <%= ENV['MONGOLAB_URI'] %>
Estoy recibiendo el siguiente error en el empuje heroku:
Running: rake assets:precompile
There is a configuration error with the current mongoid.yml.
Problem:
No database provided for session configuration: :default.
Summary:
Each session configuration must provide a database so Mongoid knows where the default database to persist to. What was provided was: {"another"=>{"uri"=>nil}}.
Resolution:
If configuring via a mongoid.yml, ensure that within your :default section a :database value for the session's default database is defined.
Example:
\_\_development:
\_\_\_\_sessions:
\_\_\_\_\_\_default:
\_\_\_\_\_\_\_\_database: my_app_db
\_\_\_\_\_\_\_\_hosts:
\_\_\_\_\_\_\_\_\_\_- localhost:27017
There is a configuration error with the current mongoid.yml.
Problem:
No database provided for session configuration: :default.
Summary:
Each session configuration must provide a database so Mongoid knows where the default database to persist to. What was provided was: {"another"=>{"uri"=>nil}}.
Resolution:
If configuring via a mongoid.yml, ensure that within your :default section a :database value for the session's default database is defined.
Example:
\_\_development:
\_\_\_\_sessions:
\_\_\_\_\_\_default:
\_\_\_\_\_\_\_\_database: my_app_db
\_\_\_\_\_\_\_\_hosts:
\_\_\_\_\_\_\_\_\_\_- localhost:27017
Asset precompilation completed (15.47s)
¿qué estoy haciendo mal aquí? He seguido las instrucciones mongoid.org:
http://mongoid.org/en/mongoid/docs/installation.html
estoy usando 3.0.0.rc MongoId
Esto no funcionó para mí. Gracias por la ayuda, aunque – Goalie
, ¿cuál es el valor de ENV ['MONGOLAB_URI']? – abhas
He cambiado algunos elementos por motivos de seguridad, pero así es como se ve: 'mongodb: // testappuser: [email protected]: 97321/testapp_production' – Goalie