I'm trying to read a pdf file in rails using pdf-reader gem of rails. Here is my code
<%
reader = PDF::Reader.new('/uploads/pdf/pdf_1.pdf')
puts reader.pdf_version
puts reader.info
puts reader.metadata
puts reader.page_count
%>
There problem is in loading the PDF file.
Also I can access my PDF using this url http://localhost:3000/uploads/pdf/pdf_1.pdf
This is the error I'm getting:
input must be an IO-like object or a filename
IDK what I'm doing wrong. Any help will be greatly appreciated.