Hi, Has anyone done any work with Erik Veenstra''s Tar2RubyScript (http://www.erikveen.dds.nl/tar2rubyscript/index.html) and Rails? His page says: "Tar2RubyScript transforms a directory, containing your application, and its subdirectories, into one single Ruby script, along with some code to handle this archive. This script can be distributed to our friends. When they''ve installed Ruby, they just have to double click on it and your application is up and running!">From reading the docs, I get the sense that it''s pretty easy topackage up a script, but it looks like there might be some path requirements that I haven''t quite wrapped my head around yet. (Section 3.2 on that page.) The idea of a full Rails app as one .rb file (with an included WEBrick?) seemed pretty exciting. Of course, I''m not sure what the performance hit would be, but it might be neat to play with. Is this sort of thing feasible? Cheers, Jason Anderson http://www.thenewjhp.com
On Thu, Dec 23, 2004 at 04:41:23AM -0700, Jason Anderson wrote:> Has anyone done any work with Erik Veenstra''s Tar2RubyScript > (http://www.erikveen.dds.nl/tar2rubyscript/index.html) and Rails? > > His page says: > > "Tar2RubyScript transforms a directory, containing your application, > and its subdirectories, into one single Ruby script, along with some > code to handle this archive. This script can be distributed to our > friends. When they''ve installed Ruby, they just have to double click > on it and your application is up and running!" > > >From reading the docs, I get the sense that it''s pretty easy to > package up a script, but it looks like there might be some path > requirements that I haven''t quite wrapped my head around yet. > (Section 3.2 on that page.) > > The idea of a full Rails app as one .rb file (with an included > WEBrick?) seemed pretty exciting. Of course, I''m not sure what the > performance hit would be, but it might be neat to play with. > > Is this sort of thing feasible?Funny you should mention this...Just yesterday this very thing was tested out on Hieraki. An archive was made that when run would load the db structure if requested and then start up the Webrick server. It *just worked* (on the one machine where it was tested...). Work is now being done to extend the script/server so that database configuration information can be passed, and tar2rubyscript will be added to railties with a rake task to generate an archive of your application which can then be executed with various command line arguments that indicate what database, user, adapter, and etc to use. There are other packaging systems being considered/worked on as well. marcel -- Marcel Molina Jr. <marcel-WRrfy3IlpWYdnm+yROfE0A@public.gmane.org>
I would be very interested in having the ability to compile a rails app to a binary (such as with exerb, for example) which would accept command line args and run WEBrick, etc. Marcel, did your test with Tar2RubyScript include images which were part of your web application? Are you actively pursuing development on such a mechanism? John-Mason Marcel Molina Jr. wrote:> On Thu, Dec 23, 2004 at 04:41:23AM -0700, Jason Anderson wrote: > >>Has anyone done any work with Erik Veenstra''s Tar2RubyScript >>(http://www.erikveen.dds.nl/tar2rubyscript/index.html) and Rails? >> >>His page says: >> >>"Tar2RubyScript transforms a directory, containing your application, >>and its subdirectories, into one single Ruby script, along with some >>code to handle this archive. This script can be distributed to our >>friends. When they''ve installed Ruby, they just have to double click >>on it and your application is up and running!" >> >>>From reading the docs, I get the sense that it''s pretty easy to >>package up a script, but it looks like there might be some path >>requirements that I haven''t quite wrapped my head around yet. >>(Section 3.2 on that page.) >> >>The idea of a full Rails app as one .rb file (with an included >>WEBrick?) seemed pretty exciting. Of course, I''m not sure what the >>performance hit would be, but it might be neat to play with. >> >>Is this sort of thing feasible? > > > Funny you should mention this...Just yesterday this very thing was > tested out on Hieraki. An archive was made that when run would load > the db structure if requested and then start up the Webrick server. It > *just worked* (on the one machine where it was tested...). Work is now > being done to extend the script/server so that database configuration > information can be passed, and tar2rubyscript will be added to railties > with a rake task to generate an archive of your application which can > then be executed with various command line arguments that indicate > what database, user, adapter, and etc to use. There are other packaging > systems being considered/worked on as well. > > marcel