sauronnikko
sauronnikko

Reputation: 5435

Rails 3 - Store and open pdf files in Rails directory when using Heroku

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

Upvotes: 1

Views: 291

Answers (1)

sauronnikko
sauronnikko

Reputation: 5435

Turns out I had specified the .slugignore file to ignore all pdf files.

Upvotes: 1

Related Questions