[Rubygems-developers] Updating RubyGems as a GEM
Jim Weirich
jim at weirichhouse.org
Sun Jul 25 12:32:52 EDT 2004
There have been several requests to have rubygems itself available as a
gem. Unfortunately, that is a chicken and egg type of problem in that
RubyGems must be installed before any gems can be downloaded and installed.
But, we could provide RubyGems *updates* as a gem.
Here's what I did ... I created a Gem spec for "rubygems-update" that
packages the current rubygems software as a gem. Someone running a
relatively recent version of RubyGems can download and install the gem
with ...
gem install rubygems-update --remote
Then they run a special command that updates their local installation of
rubygems ...
update_rubygems
The command works only once, and thereafter recommends that they can now
uninstall the update gem.
In a way, I regret that we can't generate old-style gem files now,
because if we could, we could use this technique to update current
installations to the new format.
The changes are in CVS. Take a look and provide feedback.
Other thoughts: What do people think about adding a
"post_install_command" option that could automatically run a script
after installation. That would allow us to get rid of the
"update_rubygems" script.
On another note: There are two unit tests failing since the gem file
format has been updated. One problem is that ill formated files
generate an unexpected exception. I haven't looked at the other problem
yet.
--
-- Jim Weirich jim at weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
More information about the Rubygems-developers
mailing list