[Rubygems-developers] [ rubygems-Bugs-22226 ] RubyGems 1.3 fails on windows (undefined method `uid' for nil:NilClass)

noreply at rubyforge.org noreply at rubyforge.org
Sun Apr 26 17:48:51 EDT 2009


Bugs item #22226, was opened at 2008-09-29 15:30
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=22226&group_id=126

Category: RubyGems installer (setup.rb)
Group: None
Status: Closed
Resolution: Out of Date
Priority: 3
Submitted By: Philippe Vaucher (silex)
Assigned to: Luis Lavena (luislavena)
Summary: RubyGems 1.3 fails on windows (undefined method `uid' for nil:NilClass)

Initial Comment:
Gem 1.3 does not work out of the box on windows.

Here is what happens:

C:\>gem update
Updating installed gems
ERROR:  While executing gem ... (NoMethodError)
    undefined method `uid' for nil:NilClass

The problem is in C:\ruby\lib\ruby\site_ruby\1.8\rubygems.rb, line 713:

"if 0 == File.expand_path(path).index(Gem.user_home) and Etc.getpwuid.uid != File::Stat.new(Gem.user_home).uid then"

Which should be replaced with:

"if 0 == File.expand_path(path).index(Gem.user_home) and !Gem.win_platform? and Etc.getpwuid.uid != File::Stat.new(Gem.user_home).uid then"

Then everything works as expected.

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

Comment By: Dustin Carver (bsdpunk)
Date: 2009-04-26 16:48

Message:
This is happening to me in 1.3.2, on Windows.

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

Comment By: Luis Lavena (luislavena)
Date: 2008-10-29 15:23

Message:
Thank you for reporting this.

This is actually fixed in RubyGems 1.3.1 and should be available to you in the form of zip package.

Please follow the instructions here:

http://blog.mmediasys.com/2008/08/04/problems-with-rubygems-find-here-some-handy-tips/

HTH,
--
Luis Lavena




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

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


More information about the Rubygems-developers mailing list