title: Missing required arguments: aws_access_key_id, aws_secret_access_key on rake test
body: <p>I'm doing chapter 11 of hartle's tutorial.
  When I ran <code>heroku run rake db:migrate</code> I got this error:</p>
  
  <pre><code>Missing required arguments: aws_access_key_id, aws_secret_access_key
  </code></pre>
  
  <p>I solved it with the answer in <a href="https://stackoverflow.com/questions/27949158/heroku-missing-required-arguments-aws-access-key-id-aws-secret-access-key-f/27950864#comment48059596_27950864">enter link description here</a> and migrate successfully.but now when I run</p>
  
  <pre><code>bundle exec rake test
  </code></pre>
  
  <p>It gives me:</p>
  
  <pre><code>rake aborted!
  ArgumentError: Missing required arguments: aws_access_key_id, aws_secret_access_key
  </code></pre>
  
  <p>This is my carrierwave file:</p>
  
  <pre><code>CarrierWave.configure do |config|
    config.fog_credentials = {
      :provider               =&gt; 'AWS',
      :aws_access_key_id      =&gt; ENV['S3_KEY'],
      :aws_secret_access_key  =&gt; ENV['S3_SECRET'],
      :region                 =&gt; ENV['S3_REGION'],
      :endpoint               =&gt; ENV['S3_ENDPOINT']
    }
  
    if Rails.env.test? || Rails.env.development?
      config.storage = :file
      config.enable_processing = false
      config.root = "#{Rails.root}/tmp/uploads/#{DateTime.now.to_f}.#{rand(999)}.#{rand(999)}"
    else
      config.storage = :fog
    end
  
    config.cache_dir = "#{Rails.root}/tmp/uploads/#{DateTime.now.to_f}.#{rand(999)}.#{rand(999)}"
    config.fog_directory  = ENV['S3_BUCKET_NAME']
    config.fog_public     = false
    config.fog_attributes = {}
  end
  </code></pre>
  
  <p>I tested the answer in <a href="https://stackoverflow.com/questions/28995164/missing-required-arguments-aws-access-key-id-aws-secret-access-key">enter link description here</a> and it didn't work for me.</p>