From: Igal Koshevoy Date: 2008-07-02T23:33:40+09:00 Subject: Re: Ruby 1.9.0/1.8.7/1.8.6/1.8.5 new releases (Security Fix) Cheri, I think I see what went wrong. You'll probably need to restow before the newly installed gem command becomes visible. Try these: wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz tar xvfz rubygems-1.2.0.tgz cd rubygems-1.2.0 sudo /usr/local/bin/ruby setup.rb --no-ri --no-rdoc sudo stow -d /usr/local/bin --restow ruby-1.8.6p230smartleaf sudo /usr/local/bin/gem install rake --no-ri --no-rdoc sudo stow -d /usr/local/bin --restow ruby-1.8.6p230smartleaf Basically, whenever new executables, like "gem", are added within the stowed directory, you need to restow. However, at least on my system, once gem is installed, it seems to be doing something clever to symlink things like rake and such into /usr/local/bin automatically without the need for a restow. If these commands don't work, can you paste the final results of the "setup.rb" command? When it finishes installing it on my system, it prints something like: RubyGems installed the following executables: /usr/local/stow/ruby-1.8.6-p230smartleaf/bin/gem When (re)stowed, the contents of that "bin" directory above are symlinked into /usr/local/bin, and that's where /usr/local/bin/gem is supposed to come from. -igal Cheri Anaclerio wrote: > Hi Igal, > > Are you sure these are the right steps for installing gems for the > Smartleaf patched interpreter? I've followed all your steps outlined > below, but when I get to > > sudo /usr/local/bin/gem install rake --no-ri --no-rdoc, > > the command is not found. > > i.e., > [Cheri@localhost rubygems-1.2.0]$ sudo /usr/local/bin/gem install rake > --no-ri --no-rdoc > sudo: /usr/local/bin/gem: command not found > > I don't think I'm installing RubyGems in the right directory path. > > Thanks in advance for your help. > > - Cheri > > > > Igal Koshevoy wrote: > >> Cheri Anaclerio wrote: >> >>> >>> >> The problem is that the copy of RubyGems installed via Yum >> (/usr/bin/gem) is using your old interpreter (/usr/bin/ruby) and knows >> nothing about your new manually-compiled interpreter >> (/usr/local/bin/ruby). >> >> The solution is to install RubyGems for the new interpreter, e.g.: >> >> wget http://rubyforge.org/frs/download.php/38646/rubygems-1.2.0.tgz >> tar xvfz rubygems-1.2.0.tgz >> cd rubygems-1.2.0 >> sudo /usr/local/bin/ruby setup.rb --no-ri --no-rdoc >> sudo /usr/local/bin/gem install rake --no-ri --no-rdoc >> >> Because the above changes the stowed directory structure, you'll want to >> restow it so that the new files are linked into /usr/local, e.g.: >> >> pushd /usr/local/stow; sudo stow --restow ruby-1.8.6p230smartleaf; >> popd >> >> There's a way to make multiple Ruby interpreters share a copy of the >> installed gems by setting the GEM_HOME environmental variable. However, >> this seems like a bad idea and you're best off just installing new >> copies of the gems you need. >> >> -igal >> > >