[Rubygems-developers] How do application gems work?

Chad Fowler chad at chadfowler.com
Tue Apr 13 23:58:06 EDT 2004

On 13/4/2004, at 8:57 PM, Jim Weirich wrote:

> Gavin Sinclair wrote:
>> I just remote-installed rake.  How do I run it?
> There is a small manual step required when installing as a gem.  See 
> the  instructions at http://rake.rubyforge.org (the Gem Installation 
> section).
> Once installed, you just invoke it by typing "rake target" to build a 
> target, or just "rake" to build the default target (assumes you have a 
> Rakefile :-)
> Is the application installation portion of RubyGems working yet?  I 
> can make a new Gem of Rake to take advantage of that when it is ready.

It worked last time I checked. :)  That's why my Rake installation was 
busted for a while.

I have added 3 new attributes to the gem spec, though only two are 
really working now (I think).  You can add "bindir" and "executables".  
"executables" is an array of the scripts from "bindir" that you want to 
be installed.  "bindir" is the relative path under the gem where the 
scripts are.

There is also a "default_executable" attribute that hasn't been used 
yet.  But the goal would be for that to be the default script that 
would be run if you were to do something like: gem --run rake

I'm definitely interested in hearing experience reports and seeing 
patches for this very poorly tested functionality. :)


More information about the Rubygems-developers mailing list