Fixed by adding: Fog.credentials = { path_style: true }
if defined?(AssetSync)
AssetSync.configure do |config|
config.fog_provider = 'AWS'
config.aws_access_key_id = ENV['MY_S3_ID']
config.aws_secret_access_key = ENV['MY_S3_SECRET']
# To use AWS reduced redundancy storage.
# config.aws_reduced_redundancy = true
config.fog_directory = ENV['MY_S3_BUCKET']
# Invalidate a file on a cdn after uploading files
# config.cdn_distribution_id = "12345"
# config.invalidate = ['file1.js']
Fog.credentials = { path_style: true }
# Increase upload performance by configuring your region
config.fog_region = ENV['MY_S3_ENDPOINT']
#
# Don't delete files from the store
# config.existing_remote_files = "keep"
#
# Automatically replace files with their equivalent gzip compressed version
# config.gzip_compression = true
#
# Use the Rails generated 'manifest.yml' file to produce the list of files to
# upload instead of searching the assets directory.
# config.manifest = true
#
# Fail silently. Useful for environments such as Heroku
# config.fail_silently = true
end
end
Reference issues: https://github.com/rumblelabs/asset_sync/issues/236, https://github.com/fog/fog/issues/2357