Thanks for the report.
The problem with our example is that it does not close the file. While it might work sometimes, it is safer to call the API like this:
File.open('html.pdf', 'wb') {|f| client.convertHtml(inMemoryHtml, f)}
Does this work for you?