I have a rails 3.1 application that allows users to upload pictures. Should these pictures be stored as assets(in app/assets) and therefore be subject to Sprocket overhead(caching, fingerprinting, etc.)? Or should I keep them in public/images a开发者_如何学运维nd store them outside of the asset pipeline?
The asset/image is IMHO for structural/design images (background, icons, banners etc). Dynamically added pictures/assets should go in the public directory.
I've had this trouble and it was a permissions problem. If you are running under apache with the www-data user do this:
sudo chgrp -R www-data public
sudo chmod g+rws public
精彩评论