Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: undefined method `read' for PDF:Module #12

Closed
s2t2 opened this issue Apr 29, 2017 · 1 comment
Closed

Error: undefined method `read' for PDF:Module #12

s2t2 opened this issue Apr 29, 2017 · 1 comment

Comments

@s2t2
Copy link

s2t2 commented Apr 29, 2017

I'm trying to use this gem to parse a PDF file that exists on my local file system. When I follow the instructions, this gem doesn't work. Please advise!

require "origami"
include Origami

local_file = File.join(File.expand_path("../../tmp", __FILE__), "my_report.pdf")

pdf = PDF.read(local_file)

#> NoMethodError: undefined method `read' for PDF:Module

Versions:

  • origami 2.0.2
  • ruby 2.2.3p173
@gdelugre
Copy link
Owner

gdelugre commented May 1, 2017

I am unable to reproduce this problem with the 2.0.2 gem on any versions of Ruby.
Are you sure you don't have another library defining its own version of a PDF class or module ?

Is the problem present if you use explicitly call Origami::PDF.read(local_file) ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants