【发布时间】:2016-12-20 18:04:41
【问题描述】:
我在 Rails 应用程序中使用 wicked_pdf gem,一切正常。问题是我安装了 wicked_pdf.exe 因为 wicked_pdf gem 无法正常工作。 它返回此错误:Bad wkhtmltopdf's path for wicked_pdf(或类似)。 这是我的 wicked_pdf 配置:
WickedPdf.config = {
# Path to the wkhtmltopdf executable: This usually isn't needed if using
# one of the wkhtmltopdf-binary family of gems.
exe_path: 'C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe',
# or
#exe_path: Gem.bin_path('wkhtmltopdf-binary', 'wkhtmltopdf')
# Layout file to be used for all PDFs
# (but can be overridden in `render :pdf` calls)
# layout: 'pdf.html',
}
我怎样才能以正确的方式使用宝石?我需要将我的应用程序发送到另一台电脑,我不想在每台电脑上安装 exe。 我不想用exe,我只想用gem。
【问题讨论】:
标签: ruby-on-rails ruby pdf ruby-on-rails-5 wicked-pdf