如果result.to_s.strip.empty,PDFkit引发“命令失败:#{invoke}”?

时间:2013-04-09 22:56:15

标签: ruby-on-rails pdfkit

我正在尝试使用PDFkit。我得到了

command failed: "/Users/burtondav/sites/ndeavor/bin/wkhtmltopdf-amd64" "--page-size" "Letter" "--margin-top" "0.75in" "--margin-right" "0.75in" "--margin-bottom" "0.75in" "--margin-left" "0.75in" "--encoding" "UTF-8" "--print-media-type" "--quiet" "-" "-"

(gem)pdfkit-0.5.3 / lib / pdfkit / pdfkit.rb中的此代码出错

73     raise "command failed: #{invoke}" if result.to_s.strip.empty?

我在/ bin /

中有wkhtmltopdf-amd64

在pdfkit.rb中,我有:

 config.wkhtmltopdf = Rails.root.join('bin', 'wkhtmltopdf-amd64').to_s

感谢您的帮助!

0 个答案:

没有答案