Ruby Gem not working in C9

309 Views Asked by At

I'm trying to write a program that can enter data into a fillable pdf. I've installed the gem per the instructions on the github pdf-forms.

I put the require pdf-forms statement at the top of my file but when I try to run the program, I get this:

/usr/local/rvm/gems/ruby-2.2.1/gems/pdf-forms-0.6.0/lib/pdf_forms/pdftk_wrapper.rb:18:in `initialize': pdftk executable #!/usr/local/bin/pdftk not found (RuntimeError)
        from /usr/local/rvm/gems/ruby-2.2.1/gems/pdf-forms-0.6.0/lib/pdf_forms.rb:15:in `new'
        from /usr/local/rvm/gems/ruby-2.2.1/gems/pdf-forms-0.6.0/lib/pdf_forms.rb:15:in `new'
        from formfill.rb:3:in `<main>

I can't find the /usr/ folder in the IDE and wanted to know how to get this set up properly. Thank you so much!

1

There are 1 best solutions below

4
On

You may forgot to install pdftk,

Either get a binary package from http://www.pdflabs.com/tools/pdftk-server/ and install it, or run

  apt-get install pdftk 

if you're on Debian or similar.