Ruby on Rails Thursday, May 24, 2012

On 24 May 2012, at 15:10, "Miguel A." <lists@ruby-forum.com> 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 https://devcenter.heroku.com/s3

>
> 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
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment