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