So today I decided to explore how to use Paperclip + Amazon S3 on Heroku for photo upload process. The process is quite straight forward.
But, I got stucked after I deployed the Rails app into my Heroku account. I got this error:
We're sorry, but something went wrong
It took me hours to find out what's wrong. Finally, I found the solution.
Here's what I've done:
- Create an IAM user here. I named it
heroku - Copy the
bucket name,access key idandsecret access keyand put them insideconfig/environments/production.rbfile (I'm using Figaro gem too) - Add a policy called
AmazonS3FullAccessfor the user in step #1
Done!
