From: Mauricio Fernandez Date: 2006-06-15T16:07:02+09:00 Subject: Re: running applications installed from gems On Thu, Jun 15, 2006 at 12:13:42PM +0900, Austin Ziegler wrote: > On 6/14/06, Mark Volkmann wrote: > >I suppose rubygems is most often used for packaging libraries, but it > >can also be used to package applications. I think it would be > >convenient if something like this were supported. > > > >gem run minesweeper > > > >Is this being considered? Are there reasons why this would be a bad idea? > > Ruwiki is packaged as a gem. It includes *multiple* "binary" programs. > Just as #autorequire is a bad idea; #autorun (what would be necessary > to support your idea) would be a bad idea. It's not #autorun but #default_executable, and it is already in RubyGems. default_executable Type: String; Optional; default = (see below) Description Of all the application files in the package, the default executable is the one that can be run directly through the gem. Usage spec.executables = ['bin/foo', 'bin/bar'] spec.default_executable = 'bin/bar' Notes If you only specify one application file in executables, that file becomes the default executable. Therefore, you only need to specify this value if you have more than one application file. The notion of running applications directly through a gem is not well supported at the moment. The idea is that you can download a gem, say monopoly.gem (the board game), and run gem monopoly.gem, which would run the monopoly application. This is not an in-demand feature. It is defacto deprecated and should be removed altogether. -- Mauricio Fernandez - http://eigenclass.org - singular Ruby