[Rubygems-developers] require_gem/autorequire vs require.

Jim Freeze rubygems at freeze.org
Wed Jun 1 22:53:46 EDT 2005


Sorry, sent this earlier but with wrong From field, 
so it never made it.

* Jim Freeze <jim at freeze.org> [2005-06-01 10:14:38 -0500]:

 * Gavin Sinclair <gsinclair at soyabean.com.au> [2005-06-01 23:28:52 +1000]:
 
 > On Wednesday, June 1, 2005, 11:00:40 PM, Jim wrote:
 > 
 > > I don't understand how you would use Gem.activate.
 > > If I start a new app, what do I do? Something like?:
 > 
 > >   require 'rubygems'
 > >   Gem.activate('rake', '1.1.1')
 > 
 > > I think I like the simple activate, or even activate_gem better.
 > 
 > >     activate_gem 'RubyInline', '= 3.2.2'
 > >     require 'inline'
 > 
 > The only difference is the name:
 > 
 >       Gem.activate 'RubyInline', '= 3.2.2'
 >       require 'inline'
 
 I understand that we want to control the namespace, but
 for some reason (at least for now) I like 
 
 > >     activate_gem 'RubyInline', '= 3.2.2'
 
 better. The Gem#whatever feels cumbersome and reminds me
 of Math::whatever. I assume that I could also do the following?
 
   include Gem
   activate 'RubyInline', '= 3.2.2.'
   
-- 
Jim Freeze
Theory and practice are the same, in theory. -- Ryan Davis


More information about the Rubygems-developers mailing list