[Rubygems-developers] [ rubygems-Bugs-27301 ] gem uninstall without sudo incorrectly reports success on OS X

noreply at rubyforge.org noreply at rubyforge.org
Fri Nov 12 17:46:27 EST 2010


Bugs item #27301, was opened at 2009-10-15 20:20
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27301&group_id=126

Category: `gem` commands (other)
Group: v1.3.x
>Status: Closed
Resolution: None
Priority: 3
Submitted By: Craig Walker (softcraft)
Assigned to: Nobody (None)
Summary: gem uninstall without sudo incorrectly reports success on OS X

Initial Comment:
On my system (OS X 10.5.8), uninstalling a gem without using "sudo" first causes gem to report that it  uninstalled the gem. However, it does not do so; the gem remains intalled.

I install gems using sudo; I get error messages if I forget it.

Running with --debug shows plenty of permissions errors, but those aren't propagated up under normal circumstances.

Attached is a copy of a gem session that shows the error and the pertinent info.

Is this a widespread issue? If so, could it be fixed so that it correctly fails?

Thanks,

Craig Walker
SoftCraft Development



----------------------------------------------------------------------

Comment By: Ryan Davis (zenspider)
Date: 2010-11-12 14:46

Message:
This ticket has been deemed stale and we're closing it in order to catch up 
with our ticket list. If you think it is still valid, please reopen.

----------------------------------------------------------------------

Comment By: Craig Walker (softcraft)
Date: 2009-10-16 12:54

Message:
I have had other problems with Ruby so I would not be
surprised if it was something specific to my machine.

Is there anything I can do to debug it further?

----------------------------------------------------------------------

Comment By: Ryan Davis (zenspider)
Date: 2009-10-16 12:27

Message:
I'd have to guess that you or macports messed with your perms in some way, or macports patches rubygems? The only other difference I see is in GEM_PATH, so that is prolly easier to check first.

I can't repro this at all:

drwxr-xr-x   7 root  admin  374 Aug 31 15:14 zenweb-2.18.1/
503 % gem uninstall zenweb
Remove executables:
	zenweb, zenwebpage, zenwebsite

in addition to the gem? [Yn]  
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions into the /usr/bin directory.
504 % gem -v
1.3.5
505 % gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.5
  - RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-10
  - GEM PATHS:
     - /Library/Ruby/Gems/1.8
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - :sources => ["http://gems.rubyforge.org"]
  - REMOTE SOURCES:
     - http://gems.rubyforge.org


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27301&group_id=126


More information about the Rubygems-developers mailing list