Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is my mongoDB hosting uri settings for mongoid.yml not working correctly?
    primarykey
    data
    text
    <p>I'm currently using the following settings (<b>which does not work</b>) in my mongoid.yml and i've correctly added the <code>MONGOLAB_URI</code> environmental variable to my heroku environment:</p> <pre><code>production: sessions: default: another: uri: &lt;%= ENV['MONGOLAB_URI'] %&gt; </code></pre> <p>I also tried the following which <b>does not work</b>:</p> <pre><code>production: uri: &lt;%= ENV['MONGOLAB_URI'] %&gt; </code></pre> <p>This also <b>does not work</b>:</p> <pre><code>production: sessions: default: uri: &lt;%= ENV['MONGOLAB_URI'] %&gt; </code></pre> <p>I'm getting the following error on the heroku push:</p> <pre><code>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"=&gt;{"uri"=&gt;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"=&gt;{"uri"=&gt;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) </code></pre> <p>What am I doing wrong here? I've followed the mongoid.org instructions:</p> <pre><code>http://mongoid.org/en/mongoid/docs/installation.html </code></pre> <p>I am using <b>mongoid 3.0.0.rc</b></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload