Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
FORK NOTES

This is a forked version of this gem to play nice with CentOS 6.7 64 bit.

A pull request that may or may not be generally useful has been sent to the owning repo.

I was getting the following error running the IMGKit gem on Centos:

libjpeg.so.8: cannot open shared object file

For this modified branch, it contains the wkhtmltoimage binary specifically for Centos 6 64bit,
compiled on Centos 6.6, extracted from the rpm package at http://wkhtmltopdf.org/downloads.html.

Also was hitting error with the lsb_version check so added a thrown error if that command fails so at least it would be easier for someone to fix the issue (ie adding the package containing that command).


ORIGINAL README

Provides linux and Mac binaries for wkhtmltoimage.

Uses the current Version of wkhtmltoimage (LGPL)
Expand Down
23 changes: 18 additions & 5 deletions bin/wkhtmltoimage
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
#!/usr/bin/env ruby

require 'mkmf'

arch = case RUBY_PLATFORM
when /64.*linux/
case `lsb_release -c`
when /jessie/ # Debian 8 - Jessie
'jessie-amd64'
lsb_release_exe = find_executable('lsb_release')
if lsb_release_exe
case `lsb_release -c`
when /jessie/ # Debian 8 - Jessie
'jessie-amd64'
else
# alternative binary for CentOS 6.7
release = `cat /etc/*release`
if release.match(/CentOS release 6\.7/)
'centos67-amd64'
else
'amd64'
end
end
else
'amd64'
end
raise '`lsb_release` command not found on host OS. Please install.'
end
when /linux/
'i386'
when /darwin/
Expand Down
2 changes: 1 addition & 1 deletion lib/wkhtmltoimage-binary/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Wkhtmltoimage
module Binary
VERSION = "0.12.2"
VERSION = "0.12.3"
end
end
Binary file added libexec/wkhtmltoimage-centos67-amd64
Binary file not shown.