ruby-on-railsamazon-web-servicesamazon-s3herokupaperclip

Paperclip + S3 + Heroku, but something went wrong


I have followed a few tutorials(https://www.youtube.com/watch?v=0_2VBDoowHs , https://devcenter.heroku.com/articles/paperclip-s3) in order to upload images to Amazon S3 on my app

But I keep receiving the error "We're sorry, but something went wrong. If you are the application owner check the logs for more information." when uploading a image

I would like to know a way to test if the app is succeeding on accessing the S3 bucket. Or even a log where I can check what is going on, I can only access the heroku log and it doesn't help too much:

2016-04-03T21:24:05.972064+00:00 heroku[worker.1]: Error R12 (Exit timeout) -> At least one process failed to exit within 30 seconds of SIGTERM

2016-04-03T21:24:05.972138+00:00 heroku[worker.1]: Stopping remaining processes with SIGKILL

2016-04-03T21:24:07.795254+00:00 heroku[worker.1]: Process exited with status 137


Solution

  • So, it was pretty simple.

    It seems that Paperclip doesn't support more recent versions of aws-sdk. So I had to change my Gemfile in order to use aws-sdk 2.0 or older.

    gem 'aws-sdk', '< 2.0'
    

    That solved the problem.

    Thanks for all the help. Using the environment variables of the AWS keys in development.rb helped a lot on debugging the code.