Error in pdfkit in rails
-
28-06-2021 - |
Question
I have done
gem install pdfkit
gem install wkhtmltopdf
in application.rb added
config.middleware.use "PDFKit::Middleware", :print_media_type => true
when i go to the link to pdf with .pdf extension
it shows Error as follows
No wkhtmltopdf executable found at bundler: command not found: which
Install missing gem executables with `bundle install`
>> Please install wkhtmltopdf -https://github.com/jdpace/PDFKit/wiki/Installing WKHTMLTOPD
Solution
One guess is that you're using Windows, but the library expects the which
command, that is available on systems like OS X and Linux, but not on Windows.
If you are using Windows, you might have better success running Rails inside Cygwin.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow