I want to create a Sinatra app that can generate epub, pdf and mobi in
Heroku. I have a good idea on the pdf part, but I have no idea how to
make it work with Heroku.
I also don't know which epub and mobi gems can be used in Heroku.
the heroku mailing list would be a better place for a question like this :).
Heroku has a tmp filesystem, so you can write files to /tmp. It is guaranteed
to stay there for the length of the request, so you can generate a pdf and
serve it. Things get problematic if you want to generate the pdf and keep it
around for later use. Then you have 2 options:
* Work probabilistically: regenerate the file each time it is not found on
the filesystem (messy...)
* Store it somewhere else after generation: S3 is a common option to do this
and its quite cheap for low volumes.
Regards,
Florian
···
On May 7, 2012, at 4:00 PM, Kenley T. wrote:
Hi guys,
I want to create a Sinatra app that can generate epub, pdf and mobi in
Heroku. I have a good idea on the pdf part, but I have no idea how to
make it work with Heroku.
I also don't know which epub and mobi gems can be used in Heroku.