我已经做好了
gem install pdfkit
gem install wkhtmltopdf
在 application.rb 添加
config.middleware.use "PDFKit::Middleware", :print_media_type => true
当我转到带有 .pdf 扩展名的 pdf 链接时
它显示错误如下
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