||A tool for distributing your Ruby-application
||2003-08-31 16:03:51 GMT
||2004-12-03 22:46:22 GMT
(Projects of this owner)
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!
So, it's a way of executing your application, not of installing
it. You might think of it as the Ruby version of Java's JAR...
Let's call it an RBA (Ruby Archive).
"It's Ruby's JAR..."
Like packing related application files into one RBA
application, you could as well pack related library files into
one RBA library. Now you don't need to install the compound
library in the traditional way before using it. Just require
Because the RBA is pure Ruby and no other programs or libraries
are needed, it's easy to distribute it to friends. They don't
have to install anything but Ruby itself.
Unlike the JAR-people, we don't need a new extension for RBA's.
A JAR isn't a Java Class, it contains a Java class; an RBA both
is and contains a Ruby script. It's also easier to change the
format of an RBA in the future, because the algorithm to handle
the RBA comes with it at a cost in bytes of less then 10K.
Another difference between the two is the entry point: JAR does
something with a manifest; RBA just loads init.rb . And, well,
they compress, we don't.
The combination of Tar2RubyScript and RubyScript2Exe is of
special interest: A complete Ruby application can be
distributed as one executable:
* Tar2RubyScript creates a standalone Ruby script (or RBA, Ruby
Archive) of the application and its directory. This RBA can
run on "the Ruby platform". This means that Ruby itself must
be installed on the targeted system.
* RubyScript2Exe avoids this dependency by compiling a
rubyscript (in casu the RBA), the Ruby interpreter and the
Ruby runtime environment into one executable.
This combination isn't necessary. Each application can be used
without the other.