【发布时间】:2015-04-18 09:44:14
【问题描述】:
我正在使用 wicked_pdf gem 进行 HTML 到 PDF 的转换。根据 Github 中的描述,我正确安装了所有内容。但我遇到了运行时错误 -
RuntimeError(错误的 wkhtmltopdf 路径:/usr/local/bin/wkhtmltopdf): app/controllers/orders_controller.rb:46:in `create
`44 @count = Item.count(:qty)
45 @temp = Item.where(:received => true).count()
46 render :pdf => "Bill" ,
47 :template => 'orders/create.pdf.erb', # Excluding ".pdf" extension.
48 page_height: 100,
49 page_width: 80`
并且 wkhtmltopdf 安装在我的系统中的 /usr/local/bin/wkhtmltopdf
指定wkhtmltopdf的路径应该是已经安装的地方。
我无法弄清楚问题所在。
【问题讨论】: