I'm not new to ruby or Sinatra but I have no idea how to get epub, mobi and pdf files using sinatra. The other problem is that I have no idea how Heroku's file system works, so please help me on a few things.
How do I get my Sinatra app to create epub mobi and pdf files based from user input and allow the user to download?
How could it work with Heroku since I'm not sure how heroku can allow users to download files?
Thanks for responding, but google gave me gems that require the use of commandline tools, but I want it as a sinatra app.
Also, I have no idea how to use the tmp directory in heroku and allow users to download files.
Thanks
Kenley
···
________________________________
From: Hassan Schroeder <hassan.schroeder@gmail.com>
To: ruby-talk ML <ruby-talk@ruby-lang.org>
Sent: Thursday, May 10, 2012 9:59 PM
Subject: Re: How to create a sinatra app that can create ebooks on heroku?
On Thu, May 10, 2012 at 12:54 AM, Kenley Tan <kenleytan@yahoo.com> wrote:
How do I get my Sinatra app to create epub mobi and pdf files based from
user input and allow the user to download?
google `ruby gem epub mobi pdf`
How could it work with Heroku since I'm not sure how heroku can allow users
to download files?
If you're generating on the fly, no problem; if you need to store the
files, you need to use an external resource like Amazon S3.
Thanks for responding, but google gave me gems that require the use of
commandline tools, but I want it as a sinatra app.
A gem is a gem - a ruby library; the fact that a given gem *provides* a
command line interface is irrelevant. Or perhaps we got very different
results from the same search
Also, I have no idea how to use the tmp directory in heroku and allow users
to download files.
Forget about trying to use the Heroku file system; it effectively doesn't
exist. Use Amazon S3 or equiv if you need to store generated files.
···
On Thu, May 10, 2012 at 7:26 AM, Kenley Tan <kenleytan@yahoo.com> wrote:
Google has customized results for each person, so could you send me links to those gems.
Also, I don't think I'll store the files, but I'll try using s3 from now on
Thanks
···
On May 10, 2012, at 10:49 PM, Hassan Schroeder <hassan.schroeder@gmail.com> wrote:
On Thu, May 10, 2012 at 7:26 AM, Kenley Tan <kenleytan@yahoo.com> wrote:
Thanks for responding, but google gave me gems that require the use of
commandline tools, but I want it as a sinatra app.
A gem is a gem - a ruby library; the fact that a given gem *provides* a
command line interface is irrelevant. Or perhaps we got very different
results from the same search
Also, I have no idea how to use the tmp directory in heroku and allow users
to download files.
Forget about trying to use the Heroku file system; it effectively doesn't
exist. Use Amazon S3 or equiv if you need to store generated files.