Every time I try to run db:migrate
or heroku run console
, I get ArgumentError: Missing required arguments: aws_secret_access_key
I have done heroku config:set
for AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY. Afterwards I run heroku config and see those two and the
S3_BUCKETcorrect. Then I run
heroku run console` and I get the error.
I have also went on my IAM management console and I gave my user the AmazonS3FullAccess
policy. Although this does nothing.
I am also using config/application.yml
from the figaro
gem to store my keys, but that's no different either.
I'm out of ideas on what to do to fix this, does anyone know what to know?
carrierwave.rb:
if Rails.env.production?
CarrierWave.configure do |config|
config.root = Rails.root.join('tmp') # adding these...
config.cache_dir = 'carrierwave' # ...two lines
config.fog_credentials = {
# Configuration for Amazon S3
:provider => 'AWS',
:aws_access_key_id => ENV['S3_ACCESS_KEY'],
:aws_secret_access_key => ENV['S3_SECRET_KEY'],
:region => 'us-west-2',
:host => 's3.example.com',
:endpoint => 'http://ift.tt/1hhRBgu'
}
config.fog_directory = ENV['S3_BUCKET']
config.fog_public = false # optional, defaults to true
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {}
end
end
Aucun commentaire:
Enregistrer un commentaire