问题
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 and store them outside of the asset pipeline?
回答1:
The asset/image is IMHO for structural/design images (background, icons, banners etc). Dynamically added pictures/assets should go in the public directory.
回答2:
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
来源:https://stackoverflow.com/questions/7391938/rails-3-1-should-file-uploads-be-added-to-asset-pipeline