ERROR with toolkit.rb

B

Bob Smyph

i was using Ruby 1.8.5 but recently upgraded to 1.8.7 and now
pdf-toolkit is not working. when i try to run a script that opens a pdf
using pdf-toolkit i get the following error:
C:/Ruby/lib/ruby/gems/1.8/gems/pdf-toolkit-0.5.0/lib/pdf/toolkit.rb:200:
undefined method `class_inheritable_accessor' for PDF::Toolkit:Class
(NoMethodError)
from
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from
C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from C:/TestingScripts/NewReadPDF.rb:2

here is the script that i am trying to execute:
#######################
require 'rubygems'
require 'pdf/toolkit'
my_pdf = PDF::Toolkit.open("c:\\hold\\AZ.pdf")
text = my_pdf.to_text.read
File.open("AZ.txt","w") do |the_file|
the_file.puts text
end
####################
 
B

Bob Smyph

Roger said:
Is that a railsy method?
-r

i didnt create it. it is a feature of the PDF Toolkit. so i would guess
that yes it is a 'railsy method'

when i change back to Ruby 1.8.5 it works just fine just not with 1.8.7
 
A

anna

Maybe is a little bit late, but... new versions of ruby doesn't have the gem pdf toolkit 0.5.0, you have to change it to gem "pdf-toolkit", "1.0.0.rc1"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top