1

I am running rails on a local server on windows. I installed wkhtmltoimage to C:/Sites/wkhtmltoimage

Now I have to tell IMGKit where to find it, so I added a file initializers/imgkit.rb:

IMGKit.configure do |config|
  config.wkhtmltoimage = 'C:/Sites/wkhtmltoimage'
end

But When I try to use IMGKit, rails tells me:

No wkhtmltoimage executable found at /usr/local/bin/wkhtmltoimage

But I set up a new path for it ?

I tried to require this file to be sure it is loaded

require 'config/initializers/imgkit.rb'

But then I get told: cannot load such file -- config/initializers/imgkit.rb

What do I have to do now ? Please help.

user1697061
  • 255
  • 3
  • 14

1 Answers1

1

You have to put full path with .exe like this:

config.wkhtmltoimage = 'C:/Sites/wkhtmltoimage/bin/wkhtmltoimage.exe'

and add this path: 'C:/Sites/wkhtmltoimage/bin/' to PATH in your environmental variables.

Then you should see the wkhtmltoimage globally.

damian004
  • 268
  • 1
  • 4
  • 13