wicked_pdf 在 Heroku 上部署后无法生成 PDF 报告
我正在尝试使用 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 文件时,我收到不同的错误:
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'
I am trying to generate PDF reports with wicked_pdf gem.
THe PDF generation works fine on my development environment, but it fails once it's deployed on Heroku
This is the error I am getting:
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'
Any idea how to address this issue?
20120207 - Additional attemps
When adding these to my gem file, I get a diffenret error:
group :production do
gem "wkhtmltopdf-heroku", :git => 'git://github.com/camdez/wkhtmltopdf-heroku.git'
end
The Error:
Location of wkhtmltopdf unknown
.bundle/gems/ruby/1.9.1/gems/wicked_pdf-0.7.2/lib/wicked_pdf.rb:20:in `initialize'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否使用正确的 wkhtmltopdf 库?
像这样的东西:
Are you using proper wkhtmltopdf library?
Something like this one: