1

I'm trying to use the pdf-reader gem (https://github.com/yob/pdf-reader) on my app (RoR with Mongoid). Unfortunately it doesn't work. I've put the gem in the Gemfile (and have done 'bundle install'). Here's my feedback:

uninitialized constant ActionView::CompiledTemplates::PDF

view-file

<% PDF::Reader.new("somefile.pdf")%>

I've tried to include the library in the model, but it doesn't work.

class User
  include Mongoid::Document
  include ::PDF::Reader

I get this error

uninitialized constant PDF

Do you know how to use the pdf-reader library on Mongoid? I am looking forward to your answers. THX!

shingara
  • 46,608
  • 11
  • 99
  • 105
arnaud13
  • 109
  • 1
  • 2
  • 11

1 Answers1

1

You need restart the server. After all gem add on your Gemfile, you need restart server to have this gem require in your application.

shingara
  • 46,608
  • 11
  • 99
  • 105