[Rubygems-developers] Application gems (was: Two feature requests)

Chad Fowler chad at chadfowler.com
Fri Sep 24 07:47:31 EDT 2004

Nice email, Assaph!.....

On 23-Sep-04, at 9:52 PM, Mehr, Assaph ((Assaph)) wrote:

> Curt wrote:
>>> Maybe it would be better if your app-gem-installer was run as
>>> the top-level script and just used rubygems with in it. That
>>> way you are in control and can run any pre or post installation
>>> steps you like.
> That's a nice idea, though probably encroaching on RPA territory :-)
> If I go that way I'll probably prefer to use just the NSIS generated
> installer, but this could work on other platforms I guess.
> Although as Mauricio pointed out, this is something best left for
> professionals: There are many issues I am unaware of.

Well ,I don't think you're any  more or less a professional packager 
than anyone else on this list, so don't be discouraged :)  We're all 

> Austin wrote:
>> If coupled with the "gem run <gemname> <execfile>" concept, esp.
>> If this functionality is made available programmatically, then the
>> app-gem-installer could do this as a functionality option:
>>   if %x{gem has <gemname> <execfile>} then %x{gem run <gemname>
> <execfile>}
> Again, kinda misses the point - there is the question as to who does
> what: who is responsible for a fully integrated installation, the user
> or the installer?
> Maybe I'll start at the beginning and describe my way of thinking.
> Critiques most welcome.

> I am writing an application that I need to distribute to others in my
> department.
> This is GUI app (wxRuby) and the environment is MS Windows. Current
> distribution process is:
> * Install Ruby (1-click)
> * Install wxRuby (1-click)
> * Install Log4r (unzip, double-click install.rb)
> * Unzip my app.zip file and either create shortcuts or run from cmd.
> When I release an update, users just need to unzip the app.zip file in
> the same place.
> Now that's not a nice way to do it. So I thought to myself, let's
> improve this. The two options I could think of:
> * Build a dedicated NSIS installer
> * Do something on top of RubyGems.

Everything up to here makes RubyGems sound like an obvious choice.  
It's, of course, the creation of shortcuts, etc. that we don't have 
available in RubyGems.

I'll snip out the rest of this message and ask a question:  For 
Windows, what functionality do you want from a post-install script or 
whatever implementation we might come up with?  Are you looking for an 
obvious, finite set of functions or are you truly in need of complete 
freedom to (on the user's OK) do whatever you like in a ruby script?

I see there being 3 possibilities:

1. Offer a full-blown post-(and pre?)-install capability for RubyGems.
2. Use RubyGems to auto-generate platform-specific installers with 
enhanced capabilities
3. Create metadata extensions on a per-platform basis that provide a 
fixed set of capabilities (that would be included as extensions to 
RubyGems) for integrating with various platforms.  In Windows, this 
might mean modifying the PATH, updating the registry, or creating 

I'm a bit uncomfortable with the pre/post-install free-for-all idea, 
though if the gem installer asks the user if it's OK I'm not sure _why_ 
it makes me uncomfortable. :)  I'm sure we should do _something_ for 
0.9.0, but I'm not settled on exactly what yet.

Assaph, I appreciate what you're doing here immensely.  I'm sure we'll 
come up with the right solution if we keep going down this path.


More information about the Rubygems-developers mailing list