so im following this tutorial: https://devcenter.heroku.com/articles/paperclip-s3
I manage to deploy it to Heroku and App is working in the development. The app is r
Add region
and s3_host_name
.
config.paperclip_defaults = {
storage: :s3,
s3_credentials: {
bucket: ENV["S3_BUCKET_NAME"],
access_key_id: ENV["AWS_ACCESS_KEY_ID"],
secret_access_key: ENV["AWS_SECRET_ACCESS_KEY"],
s3_region: ENV["S3_REGION"],
s3_host_name: ENV["S3_HOST_NAME"]
}
S3_REGION="eu-central-1" S3_HOST_NAME="s3.eu-central-1.amazonaws.com"
Regions and endpoints: http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region
Using gem "aws-sdk", "~> 2.0"
For those facing the same problem, I solved this by renaming :bucket => ENV['S3_BUCKET_NAME'],
to :bucket => ENV['AWS_BUCKET'],
and downgrading gem 'aws-sdk'
to gem 'aws-sdk', '~> 1.61.0'
and it fix my problem.