Here's my carrierwave config file:
CarrierWave.configure do |config|
config.storage = :aws
config.aws_bucket = ENV.fetch('S3_BUCKET_NAME')
config.aws_acl = :public_read
config.asset_host = 'http://example.com'
config.aws_credentials = {
access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY')
}
end
The server won't start and returns:
14:53:23 web.1 | /home/tom/paul/config/initializers/carrierwave.rb:9:in `fetch': key not found: "AWS_ACCESS_KEY_ID" (KeyError)
I entered the keys like this in the command line:
export AWS_ACCESS_KEY_ID="demo12345"
both with and without the quote marks
the command
env
displays them OK
You should be changed/edit in config/environments/development.rb as it: