我正在尝试使用 wicked_pdf gem 生成 PDF 报告。PDF 生成在我的开发环境中运行良好,但一旦部署在 Heroku 上就会失败
这是我得到的错误:
Failed to execute:
/app/.bundle/gems/ruby/1.9.1/bin/wkhtmltopdf --header-font-name 'Century Gothic' --header-left 'My Test - Neuffen, Germany' --header-right '2012-02-05 15:50:57 -0800' --header-font-size 14 --header-line --footer-center 'Generated by Biowatts - http://biowatts.org' --footer-font-name 'Century Gothic' --footer-font-size 13 --footer-line --toc-font-name 'Century Gothic' --toc-disable-links --toc-disable-back-links --orientation 'Landscape' --no-background -q - -
Error: PDF could not be generated!
.bundle/gems/ruby/1.9.1/gems/wicked_pdf-0.7.2/lib/wicked_pdf.rb:39:in `rescue in pdf_from_string'
知道如何解决这个问题吗?
20120207 - 其他尝试
将这些添加到我的 gem 文件时,我收到一个 diffenret 错误:
group :production do
gem "wkhtmltopdf-heroku", :git => 'git://github.com/camdez/wkhtmltopdf-heroku.git'
end
错误:
Location of wkhtmltopdf unknown
.bundle/gems/ruby/1.9.1/gems/wicked_pdf-0.7.2/lib/wicked_pdf.rb:20:in `initialize'