Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't update RubyGems

I'm having difficulties updating RubyGems from version 1.1.1 to newest. I've tried the following:

gem update

Result:

Updating installed gems
Bulk updating Gem source index for: http://gems.rubyforge.org/
Nothing to update

and

gem install rubygems-update

Result:

Bulk updating Gem source index for: http://gems.rubyforge.org/
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: Error installing rubygems-update:
    rubygems-update requires builder (>= 0)

and

gem install rubygems-update update_rubygems

Result:

Bulk updating Gem source index for: http://gems.rubyforge.org/
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: Error installing rubygems-update:
    rubygems-update requires builder (>= 0)
ERROR: could not find update_rubygems locally or in a repository

Then I checked, as suggested by theIV on a similar question, whether I had http://gems.rubyforge.org/ in my remote sources. Here's the gems environment:

RubyGems Environment:
  - RUBYGEMS VERSION: 1.1.1
  - RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
 - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-9
  - GEM PATHS:
    - /Library/Ruby/Gems/1.8
    - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8
  - GEM CONFIGURATION:
    - :update_sources => true
    - :verbose => true
    - :benchmark => false
    - :backtrace => false
    - :bulk_threshold => 1000
  - REMOTE SOURCES:
    - http://gems.rubyforge.org

So, yeah, any ideas?

like image 377
o01 Avatar asked Dec 23 '09 17:12

o01


People also ask

How install RubyGems manually in Kali Linux?

Installing RubyGems on Linux: Step 1: In order to install RubyGems, first we need to install ruby on Linux. Run the following command on the terminal to install ruby. Step 2: Go to the RubyGems download page and click on the zip button, this will download the zip through which you can install RubyGems.

How do I check RubyGems version?

If this is the case, you can look on /usr/lib/ruby/gems/1.8/gems/rubygems-update-x.x.x and take the directory with the highest value of x.x.x.


1 Answers

There is no need to take such drastic steps as completely rebuilding Ruby, reinstalling Rubygems from scratch or installing a version manager to solve this problem. There is simply a dependency cycle introduced by the release of hoe 2.3.0:

rubygems-update 1.3.5 requires (among other things) hoe-seattlerb
hoe-seattlerb requires hoe >= 2.3.0
hoe >= 2.3.0 requires rubygems >= 1.3.1

I wrote the blog post linked to by zipizap. To recap:

  1. If you've already tried to update, uninstall the latest rubygems-update first: sudo gem uninstall rubygems-update -v 1.3.5
  2. Update to 1.3.0: sudo gem install rubygems-update -v 1.3.0
  3. sudo update_rubygems
  4. Then update to latest: sudo gem update --system

With the release of Rubygems 1.3.6, it looks like this problem may be gone. From the release notes:

  • Development deps are no longer added to rubygems-update gem so older versions can update sucessfully.
like image 139
Steve Madsen Avatar answered Oct 12 '22 11:10

Steve Madsen