1

I am following this tutorial, but in Windows. When I run:

pdfkit --install-wkhtmltopdf

from my application directory, the pdfkit command is not recognized:

'pdfkit' is not recognized as an internal or external command,
operable program or batch file.

gem list shows that I do have the pdfkit gem installed:

pdfkit (0.5.0)

What could be the problem ?

Pan Thomakos
  • 34,082
  • 9
  • 88
  • 85
Misha Moroshko
  • 166,356
  • 226
  • 505
  • 746
  • What do you mean by run a gem? You can't run a gem per-se, but you might be able to run binaries that the gem installs. – Pan Thomakos Mar 03 '11 at 00:45
  • I'm trying to translate the instructions here: http://blog.10to1.be/rails/2010/08/18/pdfkit-and-ruby-on-rails/ to Windows. – Misha Moroshko Mar 03 '11 at 00:46
  • 1
    there is a windows installer for wkhtmltopdf... as i've already explained to you [Here](http://stackoverflow.com/questions/5163315/rails-how-to-print-models-details-to-a4-pdf-page/5163993#5163993) it works, i've tried it. – David Barlow Mar 03 '11 at 01:04

1 Answers1

2

The reason you can't run the command is because the gem has changed since August 2010, when the blog post you mention was written. If you take a look at the source code you'll see that there are no binaries at all, so running a pdfkit install command will not work. To install wkhtmltopdf (which is what that command is attempting to do) I would recommend following the instructions here. For full instructions on using the new pdfkit gem I would follow these instructions.

Pan Thomakos
  • 34,082
  • 9
  • 88
  • 85
  • 1
    [Remove automated installer commit](https://github.com/jdpace/PDFKit/commit/add90fd163a99b5767a5e0315d6b53ef48beccdf) – David Barlow Mar 03 '11 at 01:09