I am using Rails 4 and assets_sync (which uses Fog) to use Amazon S3 for my assets. The S3 bucket is on "eu-west-1" (Ireland).
In production.rb and development.rb environments I have set up the following line (being BUCKETNAME the real bucket name):
config.action_controller.asset_host = "http://s3-eu-west-1.amazonaws.com/BUCKETNAME"
Also, I have set up the next environment variables: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, FOG_DIRECTORY, FOG_PROVIDER (and also FOG_REGION=eu-west-1 in a desperate attempt).
No matters what I do, I get the following error (which is already posted in StackOverflow which an answer that does not help me)
rake assets:precompile
[WARNING] fog: followed redirect to BUCKETNAME.s3-external-3.amazonaws.com, connecting to the matching region will be more performant
[WARNING] fog: followed redirect to BUCKETNAME.s3-external-3.amazonaws.com, connecting to the matching region will be more performant
rake aborted!
Connection reset by peer (Errno::ECONNRESET)
(... more trace details ...)
Despite of this error, assets are sometimes uploaded (as application-7d888bd5c98564a528d102954bf2061a.css), which anyway does work because application is linking assets this way:
<link data-turbolinks-track="true" href="//s3-eu-west-1.amazonaws.com/BUCKETNAME/assets/application.css?body=1" media="all" rel="stylesheet" />
If it helps, I have the following options enabled in production: config.assets.compile = false config.assets.digest = true
Any suggestion that could help me to approximate to a solution?