1

I'm trying to get my test-suite to run on Travis-ci but I've run into a problem related to wkhtmltopdf.

We use PDFKit to generate PDF-files in our Rails app, which in turn uses the wkhtmltopdf tool, and all the tests that invoke the PDF generation throws the following error:

Failure/Error: pdf = voucher.to_pdf
Errno::ENOMEM:
Cannot allocate memory - bundle exec which wkhtmltopdf

The weird thing though, is that the first 10-15 tests that generates PDF pass just fine, which makes me assume that wkhtmltopdf somehow leaks memory on each invocation, resulting in hitting the hard limit for allowed memory use on the Travis-ci worker instance.

I'm using:

ruby               1.9.2 / 1.9.3
rails              3.1.6
pdfkit             0.5.2
wkhtmltopdf-binary 0.9.9.1

Does anybody have any experience with getting wkhtmltopdf and Travis-ci to play nicely together?

Thomas Dippel
  • 587
  • 1
  • 5
  • 13

0 Answers0