[Rubygems-developers] Failing gem commands; reinstalling RubyGems

Tobi Reif tobiasreif at pinkjuice.com
Mon Jan 28 03:42:00 EST 2008


On Tue 2008-01-22 I wrote:
> Hi
> 
> These gem commands fail:
> 
> $ sudo gem install rails -y
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require': no such file to load -- sources
> +(LoadError)
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_info_cache.rb:6
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:12
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:112:in `manage_gems'
>         from /usr/local/bin/gem:10
> $ sudo gem install rails --source http://gems.rubyonrails.org
> [same error]
> $ sudo gem list
> [same error]
> 
> Updating RubyGems fails too:
> 
> $ sudo gem update --system
> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
> `gem_original_require': no such file to load -- sources
> +(LoadError)
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/source_info_cache.rb:6
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/remote_installer.rb:12
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
>         from /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:112:in `manage_gems'
>         from /usr/local/bin/gem:10
> $
> 
> It seems I need to reinstall RubyGems.
> 
> What's the cleanest way to uninstall RubyGems?
> 
> My installation dir is /usr/local/lib/ruby/site_ruby/gems. Will it
> suffice to remove this dir? Or should I also remove the dirs listed
> here? http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/122616
> Or more?
> 
> Here's how I had installed RubyGems:
> 
> $ wget http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz
> $ tar -xzf rubygems-0.9.4.tgz
> $ su -
> # cat > /etc/profile.local
> GEM_HOME=/usr/local/lib/ruby/site_ruby/gems
> # ln -s /usr/local/bin $GEM_HOME/bin
> # cd /home/tobi/del/compile/gems/rubygems-0.9.4/
> # export GEM_HOME=/usr/local/lib/ruby/site_ruby/gems
> # ruby setup.rb all --prefix=/usr/local --siteruby=/usr/
> # gem env
> RubyGems Environment:
>   - VERSION: 0.9.4 (0.9.4)
>   - INSTALLATION DIRECTORY: /usr/local/lib/ruby/site_ruby/gems
>   - GEM PATH:
>      - /usr/local/lib/ruby/site_ruby/gems
>   - REMOTE SOURCES:
>      - http://gems.rubyforge.org
> # rm -f /usr/local/lib/ruby/site_ruby/gems/source_cache
> # gem update --system
> # gem install rails --include-dependencies
> # gem install mongrel
> 
> --siteruby probably was /usr/local/lib/ruby/site_ruby.

Anyone?

Tobi



More information about the Rubygems-developers mailing list