In article <2um9rbF2d68u8U1 / uni-berlin.de>,
Stephan K?mper  <Stephan.Kaemper / Schleswig-Holstein.de> wrote:
>Phil Tomson wrote:
> > ...
>
>With gems you need to
>
>     require 'rubygems'
>
>before
>
>     require 'session'
>
>for some reason.
>I guess the point is, that this way rubygems is able to install a 
>missing gem.

Oh, right.  For some reason I thought that you didn't have to require 
'rubygems' anymore.

>
>What I don't like as much is that I have to think whether I installed 
>something as a gem or not. I'd rather my ruby installation would find a 
>gem-installed file even without 'require "rubygems"' (although I might 
>not have the additional service of installing/updating missing and/or 
>outdated gems during runtime).

Unfortuneatly, until rubygems is part of the Ruby distribution this will 
probably be the case.  

When running ruby you can say:
 $ ruby -rubygems foo.rb

to have rubygems required before running your script (and you can create an 
alias so that this gets done for you).  

I just added "require 'rubygems'" to my .irbrc file.

Phil