【发布时间】:2011-08-28 15:06:20
【问题描述】:
按照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 上找不到与我的错误相关的任何内容。我看不出我做错了什么。
环境是: - 轨道 3.0.7 - 红宝石 1.8.7
谢谢,
麦芽酒
【问题讨论】:
-
我在这里详细记录了这个问题的答案stackoverflow.com/a/16577677/307308
标签: ruby-on-rails-3 heroku wkhtmltopdf