[Rubygems-developers] gem update --system --no-format-executable doesn't work

Stephen Bannasch stephen.bannasch at deanbrook.org
Mon Apr 7 00:43:05 EDT 2008

Using --no-format-executable to keep gem named 'gem' doesn't work 
when running gem update --system.

This command in JRuby:

   $ jruby -S gem update --system --no-format-executable

Installs a gem named jgem.

I've got a trunk checkout of rubygems (r1694) and made the following 
change to see if I could get the update_command to interpret the 
--no-format-executable option but I was unable to build from trunk on 
a MacOS 10.5.2 system

First problem building was with lack of certificates and then after I 
commented out the cert stuff in the Spec in Rakefile I got this error:

   $ rake gem
   undefined method `write' for "rubygems-update-1.1.0.gem":String

Haven't figured out the cause of that yet.

Anyways here's the change I was trying to test:

$ svn diff lib/rubygems/commands/update_command.rb
Index: lib/rubygems/commands/update_command.rb
--- lib/rubygems/commands/update_command.rb	(revision 1694)
+++ lib/rubygems/commands/update_command.rb	(working copy)
@@ -117,6 +117,7 @@
      args.push '--prefix', Gem.prefix unless Gem.prefix.nil?
      args << '--no-rdoc' unless options[:generate_rdoc]
      args << '--no-ri' unless options[:generate_ri]
+    args << '--no-format-executable' if options[:no_format_executable]

      update_dir = File.join Gem.dir, 'gems', "rubygems-update-#{version}"

I think that might make this command install gem as 'gem':

   $ jruby -S gem update --system --no-format-executable

I can however get an updated rubygems gem command installed as 'gem' 
if I do the two step update like this:

   $ jruby -S gem install rubygems-update
   $ jruby -S update_rubygems --no-format-executable

More information about the Rubygems-developers mailing list