Reputation: 889
I have a little problem: I have a file stored in public/uploads//paper/foo/bar
. This file is stored here by carrierwave (gem for file upload). Now, I want to put a link in my project to this file, but if I do like this: <a href="<%=a.document%>"> <%=a.name%></a>
I get a routing error like this: No route matches [GET] "/uploads/paper/foo/bar/file.pdf"
.
How can I skip this default behavior of links in rails?
Upvotes: 0
Views: 42
Reputation: 1598
This probably due to config.serve_static_files
is not set to true in config/enviroments/development.rb
or whichever environment you are running (defaults to true for development and false for production)
Upvotes: 1