I need to use some pdf files for my Rails app. As they’re few and not very heavy, I’m keeping them in my Rails app directory. For example, if 1.pdf file is in Rails root, I use open("#{Rails.root}/1.pdf") to open it. This works locally, but when I push to Heroku, all pdf files get ignored. Should I put them in a specific directory so Heroku doesn’t get rid of them? I’ve tried with Rails root, public, and app. Thanks
I need to use some pdf files for my Rails app. As they’re few
Share
Turns out I had specified the
.slugignorefile to ignore all pdf files.