Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAndrea Gomez
8,609 PointsHow can I serve static files such as a PDF using Ruby on Rails?
I want my users to be able to download a PDF when clicking on a link but when I give the route to the file and click on the link I'm getting this error: No route matches [GET] "/documents/capacitacion/Manejo%20del%20Conflicto"
Rails.root: /home/andrea/Documents/Asofarma/Platform
Heres my code: <%= link_to "Sign up now!", '/public/documents/capacitacion/Manejo del Conflicto', class: "mask" %>
1 Answer
Randy Eichelberger
Courses Plus Student 787 PointsTry including the pdf file as a file in the project then refer to it's new location