I'm using paperclip 5.0.0.beta2 in my latest rails (4.2.6) project. The application is hosted on Heroku. I can upload an image and it seems to be stored in a bucket on Amazon S3. However in the browser the image appears to have a broken url, although it's point to the bucket on Amazon S3, the url is:
When I enter this url in the browser, I get an xml page with this error message:
The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
It looks like there is an issue with the S3 endpoint.
However I set the region (eu-west-1) in configuration file:
config/environments/production.rb
config.paperclip_defaults = {
storage: :s3,
s3_region: ENV.fetch('AWS_REGION'),
s3_credentials: {
bucket: ENV.fetch('S3_BUCKET_NAME'),
access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'),
}
}
My Github repository is at:
https://github.com/acandael/gigbnb
Does anyone have an idea what's going on?
Thanks for your help,
Anthony
this is a workaround that fixed the issue for me. It's presented by aminariana