Wicked_pdf working fine in development, but not in production

ぐ巨炮叔叔 提交于 2019-12-04 15:47:22

Its much much much easier to do this if you let bundler worry about sourcing the dependency to wkthmltopdf. You can do that by installing this:

gem "wkhtmltopdf-binary"

and then running bundle install. After that you should be able to remove your custom exe_path specification and it should work correctly. If that doesn't work let me know.

Joe

If still image not showing in production environment then please try

image_tag wicked_pdf_asset_base64('image.png')
user9010931

I'm using wicked-pdf as an attachment to the email. In development, it is working fine but in production, it shows

ActionView::Template::Error: uninitialized constant AssetCdnHosts

attachments["purchase_order.pdf"] = WickedPdf.new.pdf_from_string(
        render_to_string(pdf: 'purchase_order', template: "device_orders/_preview_purchase_order.html.erb",locals: {vendor_info: vendor_info,device_order: device_order})
      )
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!