Anish Shah
Anish Shah

Reputation: 333

copy/ install wkhtmltoimage on heroku from heroku bash

i am using wkhtmltoimage for my app.While deploying it to heroku it shows wkhtmltoimage executable not found in /usr/local/bin means that i have to install or copy executable to the heroku 's local/bin folder how can i install or copy from heroku bash to /usr/local/bin folder

Upvotes: 4

Views: 757

Answers (1)

The Whiz of Oz
The Whiz of Oz

Reputation: 7043

Heroku does not play nicely with the IMGKit gem, and in order to make the screenshots work you need to download a compiled version of IMGKit.

https://wkhtmltopdf.googlecode.com/files/wkhtmltoimage-0.10.0_rc2-static-amd64.tar.bz2

You unzipped it and put it in the ‘bin’ directory of the application. Then make a configure file for IMGKit so that this would actually take effect.

IMGKit.configure do |config|
  config.wkhtmltoimage = Rails.root.join('bin', 'wkhtmltoimage-amd64').to_s if ENV['RACK_ENV'] == 'production'
end

Upvotes: 3

Related Questions