https://github.com/jordan-brough/heroku-pdfのガイドに従って、wicked_pdf をローカルで動作させ、期待どおりに PDF を作成することができました。ただし、herokuにプッシュすると、pdfを呼び出すたびにしばらくするとアプリがクラッシュします
ログは私にこれを与えます:
2011-05-19T06:36:56+00:00 app[web.1]: Started GET "/authors/cash_payment_receipt/4dd4aff0a2d5a5000100000c.pdf" for XXX.XXX.XXX.XXX at Wed May 18 23:36:56 -0700 2011
2011-05-19T06:36:56+00:00 heroku[router]: Error H13 (Connection closed without response) -> GET xxx.xxxx.com/authors/cash_payment_receipt/4dd4aff0a2d5a5000100000c.pdf dyno=web.1 queue=0 wait=0ms service=0ms bytes=0
2011-05-19T06:36:56+00:00 app[web.1]: !! Unexpected error while processing request: PDF could not be generated!
2011-05-19T06:36:56+00:00 app[web.1]: /app/.bundle/gems/ruby/1.8/gems/wkhtmltopdf-0.1.2/bin/wkhtmltopdf_linux_386: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
wkhtmltopdf bin を rails-root/bin ディレクトリに追加し、権限を確認しましたが、問題ありませんでした。最初に 0.10rc2 を試してから 0.9.9 に戻しましたが、結果はすべて同じです。
エラーに関連する Google で何も見つかりません。私が間違っていることはわかりません。
env は次のとおりです。 - rails 3.0.7 - ruby 1.8.7
ありがとう、
エール