# Vicious versioning cycle prevents upgrading Ruby Gems

**URL:** <https://www.ruby-forum.com/t/vicious-versioning-cycle-prevents-upgrading-ruby-gems/175873>\
**Category:** Ruby\
**Created:** [September 21, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/vicious-versioning-cycle-prevents-upgrading-ruby-gems/175873 "2009-09-21T23:12:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![trucker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@trucker](https://www.ruby-forum.com/u/trucker)\
**Post date:** [September 21, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/vicious-versioning-cycle-prevents-upgrading-ruby-gems/175873/1 "2009-09-21T23:12:36Z")

</div>

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/](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](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/](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/](http://gems.rubyforge.org/)  
Bulk updating Gem source index for: [http://gems.rubyforge.org/](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](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.

---

<div class="post-metadata">

**Author:** ![trucker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@trucker](https://www.ruby-forum.com/u/trucker)\
**Post date:** [September 22, 2009, 12:35am UTC](https://www.ruby-forum.com/t/vicious-versioning-cycle-prevents-upgrading-ruby-gems/175873/2 "2009-09-22T00:35:42Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![trucker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@trucker](https://www.ruby-forum.com/u/trucker)\
**Post date:** [September 22, 2009, 2:05am UTC](https://www.ruby-forum.com/t/vicious-versioning-cycle-prevents-upgrading-ruby-gems/175873/3 "2009-09-22T02:05:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![trucker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@trucker](https://www.ruby-forum.com/u/trucker)\
**Post date:** [September 22, 2009, 8:32pm UTC](https://www.ruby-forum.com/t/vicious-versioning-cycle-prevents-upgrading-ruby-gems/175873/4 "2009-09-22T20:32:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![trucker](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecae2f/32.png) [@trucker](https://www.ruby-forum.com/u/trucker)\
**Post date:** [September 22, 2009, 1:24am UTC](https://www.ruby-forum.com/t/vicious-versioning-cycle-prevents-upgrading-ruby-gems/175873/5 "2009-09-22T01:24:42Z")

</div>

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.
