title: Failing to access environment variables within `database.yml` file
body: <p>I have the following developement section of my <code>development.yml</code> file:</p>
  
  <pre><code>development:
    adapter: postgresql
    host: localhost
    database: testtb
    username: app_user
    password: ENV['APP_USER_POSTGRES_PASSWORD']     &lt;= Troublesome line
  </code></pre>
  
  <p>When I open a rails console via <code>bundle exec rails console</code> and type <code>ENV['APP_USER_POSTGRES_PASSWORD']</code> I get back the DB password I've specified in my local profile. However, when I start my rails server, it can't connect to the DB, failing with </p>
  
  <pre><code>PGError FATAL:  password authentication failed for user "app_user"
  </code></pre>
  
  <p>This was previously working when I had the DB password actually typed out in plain text, rather than trying to access it via <code>ENV['...']</code>, but for obvious reasons I want to keep the actual password out of this file entirely (and therefore out of the code repository) while still being able to commit other, non-secure changes to the <code>database.yml</code> file.</p>
  
  <p><strong>Is there something special about the syntax I'm missing</strong>, or are the environment variables for some reason not available when the <code>database.yml</code> file is being loaded?</p>