[Rubygems-developers] Confusion on the use of 'executables' in gem specs

Jim Weirich jim at weirichhouse.org
Fri Sep 10 23:57:01 EDT 2004

It has come to my attention that there is some confusion about the use of
"executables" (and possibly "default_executable").  Should the values in
executables be

1) the basename of the executable file, or
2) the bindir + basename ?

Previous to 0.8.0 I believe (1) to be the case (at least that's what the
rake gem does).  However the files accessor (which returns a list of files
needed for the gem) puts the unadorned executable names in the list of
files (e.g. it adds "rake" instead of "bin/rake" to the file list).  This
causes problems with rake because it doesn't know what to do the unadorned
file name.  Option (2) doesn't work either because then the executable
stub installer gets the directories wrong.

I'm thinking (1) is correct and that the files accessor should add bindir
to the executable before adding it to the list of files.


-- Jim Weirich     jim at weirichhouse.org    http://onestepback.org
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)

More information about the Rubygems-developers mailing list