Erik Veenstra
1/16/2005 10:16:00 PM
> > They don't need Ruby, because it's embedded in the
> > executable, along with the application files and libraries
> > and gems. Everything they need to run the application. To
> > `b run` the application. Not to install the application.
> > This document describes a way to create an `tt,b
> > application.exe`. Not a `tt setup.exe` or an `tt
> > install.exe`.
>
> I agree this is pretty nice to have, especially distributing
> applications for Windows customers for example.
>
> But... what happens when you have several applications in the
> same system ? You will have several copies of Ruby and
> associated libraries.
>
> Whilst this is handy for giving away an app contained in a
> single exe, (I've tested it and it works really great!) this
> is very different from distributing a JAR
>
> The analogy here with the Java world would be having a JRE
> for each JAR you install in your system. That's clearly not a
> model I want to use in a desktop with several different apps
> installed.
Don't mix up an EXE with a JAR. An RBA is comparable to a JAR.
The EXE goes one step further and includes the interpreter and
the runtime environment. The latter is not possible with Java.
(Don't challenge me...) If the customer has installed Ruby, he
can use the RBA instead of the EXE. Like JAR's on Java. He
needs the EXE only if he doesn't have Ruby installed.
In other words, he doesn't necessarily depend on Ruby when
using a Ruby application, whereas he depends on Java to run a
Java application. He probably doesn't even care if it's Java or
Ruby, as long as he gets his work done with the application.
The programmer is the one who does care about which language to
use. So, I don't want to bother my customers with installing
interpreters and libraries and stuff which he is not interested
in. That's where my projects are all about.
> For instance, I have no way to update the Ruby runtime
> environment for all apps at once, I have to 'compile' and
> redistribute an exe for each application, which is not nice
> for installing a Ruby bugfix.
I regenerate all executables with just one command...
> I don't think these approaches are mutually exclusive, I
> would definetly like to be able to run an .RBA from Ruby too,
> without having to copy the Ruby environment (the JRE
> analogous) for every installed RBA.
You can. An RBA is just a plain Ruby script, so you can run it
on "the Ruby platform".
> I think there is a place for both approaches. Does the
> current framework contemplate this other possibility ?
On my own PC, which happens to be the Ruby devel PC as well, I
run all applications from their own directories. Probably like
you do. I generate the RBA and the executable only when I'm
about to ship the application. Some colleagues have installed
Ruby and work with the RBA. Some don't and use the executables.
Whatever they like.
That's one application that appears (unchanged) in three
different forms. No problem.
gegroet,
Erik V.