Les*_*nis 5 ruby ruby-on-rails pdfkit wkhtmltopdf
我正在尝试在Ruby on Rails应用中调试pdf生成错误的问题。我正在使用pdfkit + wkhtmltopdf-binnary gems。由于某些问题,我在日志中收到500和此信息:
RuntimeError (command failed (exitstatus=1): /home/ubuntu/phys-track/shared/bundle/ruby/2.0.0/bin/wkhtmltopdf --quiet --page-size Letter --margin-top 0.75in --margin-right 0.75in --margin-bottom 0.75in --margin-left 0.75in --encoding UTF-8 - -):
我想知道在哪里可以找到任何日志,在哪里可以看到有关该问题的更多详细信息。
小智 0
您可以尝试在 PDFKit 配置中将 verbose 设置为 true ..例如,您可能有这样的 config/application.rb 文件
require 'pdfkit'
PDFKit.configure do |config|
# other options here
config.verbose = true #to turn off --quiet mode
end
Run Code Online (Sandbox Code Playgroud)
配置示例可以参考https://github.com/pdfkit/pdfkit/blob/master/spec/pdfkit_spec.rb
| 归档时间: |
|
| 查看次数: |
904 次 |
| 最近记录: |