title: cannot load 'rails.application.database_configuration' undefined method'[]' for nil:NilClass
body: <p>I changed my database.yml to use sqlite3 database in test and developement and postgresql in production. My application run fine in production but when I launch test or development environements i have this error :</p>
  
  <pre><code>Cannot load 'Rails.application.database_configuration':
  undefined method'[]' for nil:NilClass (NoMethoError)
  </code></pre>
  
  <p>my database.yml:</p>
  
  <pre><code># SQLite version 3.x
  #   gem install sqlite3
  #
  #   Ensure the SQLite 3 gem is defined in your Gemfile
  #   gem 'sqlite3'
  #
  default: &amp;default
    adapter: sqlite3
    pool: 5
    timeout: 5000
  
  development:
    &lt;&lt;: *default
    database: db/development.sqlite3
  
  # Warning: The database defined as "test" will be erased and
  # re-generated from your development database when you run "rake".
  # Do not set this db to the same as development or production.
  test:
    &lt;&lt;: *default
    database: db/test.sqlite3
  
  production:
    pool: 5
    timeout: 5000
    encoding: utf8
    adapter: postgresql
    host: &lt;%= Rails.application.secrets[:database][:host]%&gt;
    database: &lt;%= Rails.application.secrets[:database][:name]%&gt;
    username: &lt;%= Rails.application.secrets[:database][:username]%&gt;
    password: &lt;%= Rails.application.secrets[:database][:password]%&gt;
  </code></pre>