Heroku Deploy - assets issue_paperclip

Hi all, I’m deploying my app on heroku for tests and have noticed
something odd.

I’m rails 3.2.3 and paperclip do handle the displaying/uploading images
process.
Everything runs smooth on my localhost but on Heroku, if I upload a
picture and the App isn’t “accessed” for like during the night, in the
morning the image is not there and the ‘broken image icon’ takes its
place.

If I re-add the image and keep accessing the website for like, every
hour, everything is fine and all the images are there.

It’s worth mentioning that I’m saving my images in paperclip’s default
path, in the public->assets folder. And for testing, I wanted to keep it
that way.

Will this issue go away if I set the path to my app->assets folder?

Or does this have anything to do with the inner workings of Heroku,
assigning one dyno and then idling after some time with no hits, and
when the application “wakes up again” another dyno is assigned and the
app loses its uploaded images?

Is storing in Amazon S3 the only way of solving this or does altering
the path of paperclip to the App folder solves the problem?
If so, will it be a reliable option for a production stage?

Thank in advance for enlightening a RoR beginner,

Regards

On 24 May 2012, at 15:10, “Miguel A.” [email protected] wrote:

Hi all, I’m deploying my app on heroku for tests and have noticed
something odd.

My understanding (and experience) is that you can’t modify the heroku
file system once your application slug has been generated and uploaded,
so you’ll need to use S3 (or equivalent). Tbf, it’s very simple and
robust. Tutorial at Using AWS S3 to Store Static Assets and File Uploads | Heroku Dev Center