Closed hinmn closed 11 years ago
The problem is that wkhtmltopdf is a binary executable, which apparently doesn't work on your system.
Perhaps it's a 64bit vs. 32bit difference?
➜ vendor git:(master) file wkhtmltopdf
wkhtmltopdf: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), statically linked, stripped
In fact, I don't appear to be able to run it either:
➜ vendor git:(master) ./wkhtmltopdf
zsh: exec format error: ./wkhtmltopdf
(On a Mountain Lion system here)
Anyway - run the Sinatra app (app.rb
) to get a browser loadable copy of the book. We should probably add a different rake target to build the html as a file, separate from a rake target to build the pdf, but that doesn't exist at the moment.
I'm open to better ways to bundle the wkhtmltopdf binary in the app, I haven't actually tested it for a while myself.
We should probably add a different rake target to build the html as a file, separate from a rake target to build the pdf, but that doesn't exist at the moment.
Not sure I see the benefit of having both an HTML export and the app, if you want to browse the book via HTML just start rackup the sinatra app. If you know an easy way to implement this tho, go for it.
I haven't checked on Linux yet, but I'm sure it's the same:
-bash: ./wkhtmltopdf: cannot execute binary file
Both are 64-bit systems.
I'm attempting to use a few different bins from here, http://code.google.com/p/wkhtmltopdf/ , but I'll probably have to try on Linux as I'm still not so familiar with OSX (I'm actually new to it - I thought this error was a fault of mine).
I was able to build the book on Chakra Linux using the 64-bit bin provided here: http://code.google.com/p/wkhtmltopdf/downloads/detail?name=wkhtmltopdf-0.11.0_rc1-static-amd64.tar.bz2&can=2&q=
I'm unable to get the book to build on Linux (Chakra) or OSX (Mountain Lion). Here's the error on OSX (same on Linux, actually):
I looked through the previous issues but the other failed book builds seemed to be solved. Here's the command with --trace: https://gist.github.com/c07cb6287f5e54c477a8