I'm doing chapter 11 of hartle's tutorial. When I ran heroku run rake db:migrate
I got this error:
Missing required arguments: aws_access_key_id, aws_secret_access_key
I solved it with the answer in enter link description here and migrate successfully.but now when I run
bundle exec rake test
It gives me:
rake aborted!
ArgumentError: Missing required arguments: aws_access_key_id, aws_secret_access_key
This is my carrierwave file:
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => ENV['S3_KEY'],
:aws_secret_access_key => ENV['S3_SECRET'],
:region => ENV['S3_REGION'],
:endpoint => 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
I tested the answer in enter link description here and it didn't work for me.
Aucun commentaire:
Enregistrer un commentaire