天道酬勤,学无止境

ajaxuploader

Rails 3.1 assets not recognizing new images uploaded by rmagick until server restart

I have my Rails 3.1.0 application running with passenger in production environment and I have a section where the application allows the user to change his profile picture so I upload the image using an ajax uploader and in my controller I upload the file and generate different sizes for the image with rmagick then I render the new image with an image_tag but the application won't show the image till I restart the server. What I get is No route matches [GET] "assets/path/to/image.png" If I restart the server It will show the image, but obviously I can't be restarting the server every once a

2021-05-31 18:43:25    分类:问答    ruby-on-rails-3.1   rmagick   assets   ajaxuploader