Rails: Error running wkhtmltopdf -- (error while loading shared libraries)

I had the same, issue on Debian Squeeze, amd64. Installing libxrender1 solved the issue for me.

sudo apt-get install libxrender1

Ran into this today on a RHEL7 machine running the static version of wkhtmltopdf. Solution was to install a few dependencies:

yum install libXrender libXext fontconfig 

The Unix packages x11-libs/libXext and x11-libs/libXrender are dependencies

Gentoo:

sudo emerge libXext libXrender

PDFkit wiki also explains in more detail how to get wkhtmltopdf working on engine yard. PDFkit wiki

Debian or Ubuntu:

sudo apt-get install libxrender1

I need also do after:

sudo apt-get install libfontconfig1