I have just installed Ruby Enterprise Edition and am installing some gems for it. Stock Ruby 1.8.6 is also installed on the server.
I have added /opt/ruby-enterprise-1.8.6-20090201/bin to my PATH a head of /usr/bin where ruby and gem live.
which gem confirms this:
/opt/ruby-enterprise-1.8.6-20090201/bin/gem
However, when I install gems like this:
gem install some_gem
They end up in /usr/lib/ruby/gems/1.8/gems/ instead of /opt/ruby-enterprise-1.8.6-20090201/lib/ruby/gems/1.8/gems/. 
But if I use /opt/ruby-enterprise-1.8.6-20090201/bin/gem install some_gem it does go into REE's gem directory.
I don't get it. Is there some config option I have to change? I am using sudo here. Maybe that has something to do with it?
 
     
     
     
     
     
    