I have this working locally, storing the template files in #{Rails.root}/tmp
, using system \"cd tmp/template; zip -r ../#{@filename} *\"
to zip up the
Can't you just a create directory within #{Rails.root}/tmp
called, say, #{Process.pid}_docx/something_nice/
? Copy (or symlink) what you need into:
#{Rails.root}/tmp/#{Process.pid}_docx/something_nice/
Then
system "cd #{Rails.root}/tmp/#{Process.pid}_docx/; zip -r x.zip something_nice"
And then you have:
#{Rails.root}/tmp/#{Process.pid}_docx/x.zip
With a nice pretty internal structure that doesn't include your PID.