ERROR with toolkit.rb

Discussion in 'Ruby' started by Bob Smyph, Sep 13, 2010.

  1. Bob Smyph

    Bob Smyph Guest

    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
    ####################
     
    Bob Smyph, Sep 13, 2010
    #1
    1. Advertisements

  2. Bob Smyph

    Roger Pack Guest

    Is that a railsy method?
    -r
     
    Roger Pack, Sep 14, 2010
    #2
    1. Advertisements

  3. Bob Smyph

    Bob Smyph Guest

    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
     
    Bob Smyph, Sep 14, 2010
    #3
  4. Bob Smyph

    anna Guest

    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"
     
    anna, Nov 27, 2012
    #4
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.
Similar Threads
There are no similar threads yet.
Loading...