zulhfreelancer
9/26/2015 - 8:35 PM

Rails Paperclip Amazon S3 Heroku Error: We're sorry, but something went wrong.

Rails Paperclip Amazon S3 Heroku Error: We're sorry, but something went wrong.

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:

  1. Create an IAM user here. I named it heroku
  2. Copy the bucket name, access key id and secret access key and put them inside config/environments/production.rb file (I'm using Figaro gem too)
  3. Add a policy called AmazonS3FullAccess for the user in step #1

Done!