Skip to content

Instantly share code, notes, and snippets.

@zulhfreelancer
Last active September 26, 2015 20:37
Show Gist options
  • Save zulhfreelancer/1baa99fc82bd8be78626 to your computer and use it in GitHub Desktop.
Save zulhfreelancer/1baa99fc82bd8be78626 to your computer and use it in GitHub Desktop.
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

AWS

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment