问题
I am using Rails 3.2 asset pipeline to serve my assets(images, javascript. css).
I have added paperclip for photo uploads. paperclip by default stores files in public/system
When I use the url
generated by paperclip which is something like
/system/users/avatar/000/000/thumb/whatever.jpg
It gives me no route error. the file is there at the above location but I think it may be issue with asset pipleline.
Any ideas what might be going wrong ?
回答1:
just like user451893 said. you should configure your web-server (nginx, apache etc) to deliver all static assets!
in case you don't, then you need to turn on static asset serving in rails:
config.serve_static_assets = true
have a look at this issue for more details https://github.com/thoughtbot/paperclip/issues/667
来源:https://stackoverflow.com/questions/11073650/serving-images-from-public-folder-when-using-asset-pipeline-rails-3-2