Vicious versioning cycle prevents upgrading Ruby Gems

W

William Mcneill

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:
- http://gems.rubyforge.org


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
 
L

Len Lawrence

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:
- http://gems.rubyforge.org


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
 
W

William Mcneill

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.
 
L

Len Lawrence

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
 
W

W.P. McNeill

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top