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
####################