Vicious versioning cycle prevents upgrading Ruby Gems

I am stuck in a vicious cycle in which I need a newer version of Gems in
order to upgrade my current version of Gems. Is there a way out of this
aside from a clean install of gems?

I would like to install the newgem package, but I can’t because my
version of Gems is too old:

$ sudo gem install newgem
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: Error installing newgem:
hoe requires RubyGems version >= 1.3.1

I have Ruby Gems version 1.1.1 installed. Following the instructions in
Chapter 3 of the Gems manual (http://rubygems.org/read/chapter/3), I try
this to upgrade my copy of Gems:

$ sudo gem update --system
Updating RubyGems
Bulk updating Gem source index for: http://gems.rubyforge.org/
Nothing to update

Then, still following the instructions, I do:

$ sudo gem install rubygems-update
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:
hoe requires RubyGems version >= 1.3.1

This is the same error message I saw at the beginning so I’m stuck.

Here is my Gems setup:

$ gem environment
RubyGems Environment:

  • RUBYGEMS VERSION: 1.1.1
  • RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [i686-darwin]
  • INSTALLATION DIRECTORY: /sw/var/lib/gems/1.8
  • RUBY EXECUTABLE: /sw/bin/ruby1.8
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86-darwin
  • GEM PATHS:
    • /sw/var/lib/gems/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

I am running OS X. I installed Gems via the fink package manager for OS
X.

An attempt to install rubygems-update with debug tracing turned on is in
the attached file.

Thanks.

On Mon, 21 Sep 2009 16:12:44 -0500, William Mcneill wrote:

hoe requires RubyGems version >= 1.3.1

Here is my Gems setup:

  • GEM PATHS:

I am running OS X. I installed Gems via the fink package manager for OS
X.

An attempt to install rubygems-update with debug tracing turned on is in
the attached file.

Thanks.

Attachments:
http://www.ruby-forum.com/attachment/4054/gems-update-debug.txt

My sympathies. I was stuck in exactly the same loop in Mandriva 2008.1
yesterday. Found a vague note to myself; downloaded rubygems 1.3.1
tarball from RubyForge, opened it up and ran “ruby setup.rb”. Worked
like a charm. Then updated hoe without problems and back in business.

Len

On Mon, 21 Sep 2009 18:25:07 -0500, William Mcneill wrote:

If I setup Gems from a tarball on a machine with Gems already installed
in a non-standard location will it automatically upgrade instead of
creating a new version, or do I have to specify the path as an argument
to setup.rb?

If I do have to specify the path, is it the same as what gem environment
lists as INSTALLATION_DIRECTORY?

I’m trying to avoid doing a clean install and having to re-install all
my gems.

I am no expert on this. The setup.rb file has a --help option which
indicates that you can supply an installation PREFIX if you wish but
this
will not affect the location of your installed gems so you should not
need to re-install them all. That means leave INSTALLATION_DIRECTORY
alone I would think. No harm in downloading the package and looking at
the documentation files provided.

The README file lists other commands like

$ gem install --system

and

$ gem install rubygems-update # again, might need to be admin/root
$ update_rubygems # … here too

which I had not tried.

Hope this helps

Len

I downloaded the rubygems-1.3.5.tgz tarball from Ruby Forge and ran:

sudo ruby setup.rb

This installed Gems 1.3.5 over my previous version, so all of my old
gems remained in place. (I wasn’t sure that it would do this.)
Afterwards I was able to install newgem. Problem solved.

If I setup Gems from a tarball on a machine with Gems already installed
in a non-standard location will it automatically upgrade instead of
creating a new version, or do I have to specify the path as an argument
to setup.rb?

If I do have to specify the path, is it the same as what gem environment
lists as INSTALLATION_DIRECTORY?

I’m trying to avoid doing a clean install and having to re-install all
my gems.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs