I’m trying to install the yob pdf reader: https://github.com/yob/pdf-reader#readme
I’m following the directions there and do:
gem install pdf-reader
and that reports success.
I place a pdf in my directory, name it 1.pdf.
Then I create a script that has the following code:
reader = PDF::Reader.new("1.pdf")
when I run that script I get the following error:
uninitialized constant PDF (NameError)
Googling it hasn’t been very successful so far.
How do I solve this?
If it’s a pure ruby script, you may be missing the following at the beginning:
You can also specify the version of the gem that you want to require, in case you have multiple versions installed: