From: Eric Hodel Date: 2011-07-27T12:47:18+09:00 Subject: [ruby-core:38547] [Ruby 1.9 - Bug #4062] "gem uninstall" does not honor --program-suffix Issue #4062 has been updated by Eric Hodel. The feature was only partially implemented in RubyGems 1.8. It was missing a require and had confusing messaging. ---------------------------------------- Bug #4062: "gem uninstall" does not honor --program-suffix http://redmine.ruby-lang.org/issues/4062 Author: Sakuro OZAWA Status: Closed Priority: Normal Assignee: Eric Hodel Category: core Target version: 1.9.3 ruby -v: ruby 1.9.3dev (2010-11-16 trunk 29806) [x86_64-darwin10.5.0] =begin When I uninstall a gem which has bin scripts and installed with format-executable option, the scripts remain after the gem uninstallation. # install the trunk ruby with program suffix configuration. $ ../ruby/configure --prefix=/usr/local --program-suffix=-r29806 --srcdir=../ruby --enable-shared --with-opt-dir=/opt/local $ make $ sudo make install $ rehash $ ruby-r29806 -v ruby 1.9.3dev (2010-11-16 trunk 29806) [x86_64-darwin10.5.0] # temporarily hide my instaled gems and gem configuration $ mv ~/.gemrc ~/.gemrc.hiden $ mv ~/.gem ~/.gem.hidden # install a gem with explicit options. $ gem-r29806 install --format-executable --user-install --no-ri --no-rdoc nokogiri Building native extensions. This could take a while... Successfully installed nokogiri-1.4.4 1 gem installed $ rehash $ which nokogiri-r29806 /Users/sakuro/.gem/ruby/1.9.1/bin/nokogiri-r29806 # uninstall it immediately. $ gem-r29806 uninstall --format-executable --user-install nokogiri ERROR: While executing gem ... (OptionParser::InvalidOption) invalid option: --format-executable $ gem-r29806 uninstall --user-install nokogiri Remove executables: nokogiri ^^^^^^^^^^^^ SHOULD SHOW nokogiri-r29806 ^^^^^^^^^^^^ in addition to the gem? [Yn] y Removing nokogiri ^^^^^^^^^^^^ SHOULD SHOW nokogiri-r29806 ^^^^^^^^^^^^ Successfully uninstalled nokogiri-1.4.4 $ ls ~/.gem/ruby/1.9.1/bin nokogiri-r29806* ^^^^^^^^^^^^ SHOULD NOT EXIST ^^^^^^^^^^^^ See also old #1728. =end -- http://redmine.ruby-lang.org