I am building my first app on Heroku and learning how to use rails simultaneously. I have built a very simple Model, and added a 'Paperclip' gem to my build. It works on my localhost (although it doesn't seem to upload files), however when deployed on Heroku, on the 'new' form I just get:
We're sorry, but something went wrong.
We've been notified about this issue and we'll take a look at it shortly.
I can't seem to figure out where to begin debugging this. My Gemfile contains the line gem 'paperclip'
Heroku logs doesn't always help.
For your purposes since you're just getting started I would recommend setting your heroku app to "development" mode so you can see verbose error messages.
heroku config # Should return a list of your current environment, including RACK_ENV=production
heroku config:add RACK_ENV=development # now you'll get verbose error messages
heroku config:add RACK_ENV=production # set this back when you're done debugging
That should help! Share the error message with us and maybe we can help more.
Heroku has a read-only filesystem. That means Paperclip cannot save uploaded files to any place within Heroku.
If you would like to be able to upload files to an application hosted on Heroku, then you must either store the files as binary blobs within your database or you must use a separate service to store the files. If you are looking for a separate service, Paperclip has built-in support for integrating with Amazon S3.
See the relevant Heroku docs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With