From: bbiker Date: 2007-01-07T01:28:22+09:00 Subject: Re: A 'require' question Jan Svitok wrote: > > you need three commands: > > 1. require 'rubygems' # may be omitted when RUBYOPT=-rubygems or ruby > is started with -rubygems > > 2. gem 'gem_name' , '>=1.23' # this sets the required version and this > is what eric wrote about > > 3. require 'gem_name' # to actually require the file - no version or anything > > Actually the gem_name in he steps 2. and 3. may be different - one is > the name of the gem (win32-shortcut for example) while the latter is > the name of the file to be required (win32/shortcut) > > If and only if you'll see undefined method 'gem' in the second step, > then replace 'gem' with 'require_gem' (meaning you have an old version > of rubygems, and you might want to upgrade) Thank you all for your responses. I now have a clearer understanding of 'require' and 'gem' and how they cooperate.