title: set rails fog gem application.yml keys for development environment
body: <p>I'm using paperclip, fog, figaro gems to upload images to amazon S3. In production works fine as I introduced the env variables in heroku by hand.</p>
  
  <p>But in development, it is suposed to use the env from the aplication.yml file (added to .gitignore). It is not using this file, as in development the ENV[] placed in application.yml do not exist.</p>
  
  <p>I followed several tutorial for this, and in all of them I understand that the ENV[] introduced in applicaction.yml should be used. Am I wrong? Am I missing something? Do I need something else? I read that I can introduce the ENV[] by hand typing export, but I need to know if it is not enough to write them down at application.yml</p>
  
  <pre><code>#config/application.yml    
  MAPS_API_KEY: 1234googlemapapikey56788
  
  SECRET_KEY_BASE: ab1234567longkeyy2979127401411124
  AWS_ACCES_KEY_ID: ACCESSKEYID1234567
  AWS_SECRET_ACCESS_KEY: SECRETKEY123456788/jaa\12345
  AWS_REGION: eu-west-1
  S3_HOST_NAME: s3-eu-west-1.amazonaws.com
  
  development:
    FOG_DIRECTORY: example-dev
    S3_BUCKET_NAME: example-dev
  production:
    FOG_DIRECTORY: example-production
    S3_BUCKET_NAME: example-production
  </code></pre>
  
  <p>in development and production I use the same code:</p>
  
  <pre><code>#config/environments/development.rb &amp;&amp; config/environments/production.rb
  config.paperclip_defaults = {
  storage: :s3,
  s3_credentials: {
      bucket: ENV.fetch('S3_BUCKET_NAME'),
      access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
      secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'),
      s3_region: ENV.fetch('AWS_REGION'),
    }
  }
  </code></pre>
  
  <p>In production works fine, and in development I get errors like:
  development.rb:54:in `fetch': key not found: "AWS_ACCESS_KEY_ID" (KeyError)</p>
  
  <pre><code># config/initializers/paperclip.rb
  Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
  Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
  </code></pre>