[Rubygems-developers] require_gem/autorequire vs require.

Jim Freeze rubygems at freeze.org
Wed Jun 1 23:13:17 EDT 2005


* Jim Weirich <jim at weirichhouse.org> [2005-06-01 17:17:22 -0000]:

> >>> I think I like the simple activate, or even activate_gem better.
> >>
> >>      Gem.activate 'RubyInline', '= 3.2.2'
> >>
> This started off as a discussion of require_gem and how it is really doing
> two things (1) moving a gem's directories into the load path and (2)
> requiring any files marked as autorequire in the gem.
> 
> Eric has suggested activate (or activate_gem, or Gem.activate): 

> Other terms are possible.  "use" (and its variations use_gem and Gem.use)
> was considered but the Perlness of the work was a bit off-putting. 
> "enable" is another possibility.  Since this new command is only needed
> when specifying versions, something like "lockdown_version" is also
> possible.
 
Here is a list of possible names that I have seen (and some orthogonal
counterparts that I have added)

 01) require_gem
 02) gem_require
 03) select_gem
 04) gem_select
 05) activate_gem
 06) gem_activate  # reminds me of "wonder twin powers...activate!"
 07) use_gem
 08) gem_use
 09) enable_gem
 10) gem_enable
 11) Gem.require
 12) Gem.select
 13) Gem.activate
 14) Gem.use
 15) Gem.enable
 16) activate
 17) lockdown_version
 18) set_version
 19) add_gem
 20) queue_gem
 99) 
 set_the_load_path_for_a_gem_with_said_version_so_it_will_require_the_correct_version_automatically

-- 
Jim Freeze
Theory and practice are the same, in theory. -- Ryan Davis


More information about the Rubygems-developers mailing list