Generating Office docs in OpenXML. Part of the process is using zip
to combine directories and files into an archive. This works fine locally
var p = 'cd ' + target + '/; zip -r ../' + this.fname + ' .; cd ..;';
return exec.exec(p, function(err, stdout, stderr) { ... }
But fails on Heroku Cedar, with an error /bin/sh: zip: not found
. Logging in via shell (heroku run bash
) and running ls /bin
, it appears that the zip
binary does not exist. gzip
does exist, but I think that's different.
Is it possible to run zip on the Heroku from a shell process? From this link below it seems like it should be possible. (That article uses Ruby, I use Node, but I think the shell shouldn't care who's calling it?)
Rails: How can I use system zip on Heroku to make a docx from an xml template?