Setting S3 region in Carrierwave
When setting Fog S3 credentials in Carrierwave initializer remember to use developer area codes, not human names.
CarrierWave.configure do |config|
config.fog_credentials = {
:provider => 'AWS',
:aws_access_key_id => ENV['S3_ACCESS_KEY_ID'],
:aws_secret_access_key => ENV['S3_SECRET_KEY_ID'],
:region => 'eu-west-1' # not Ireland
}
config.fog_directory = ENV['S3_BUCKET']
end
Otherwise you will get OpenSSL "hostname does not match certificate" errors.
Written by Kuba Bogaczewicz
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#