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'