Bugs: Browse | Submit New | Admin

[#22226] RubyGems 1.3 fails on windows (undefined method `uid' for nil:NilClass)

Date:
2008-09-29 16:30
Priority:
3
Submitted By:
Philippe Vaucher (silex)
Assigned To:
Luis Lavena (luislavena)
Category:
RubyGems installer (setup.rb)
State:
Closed
Summary:
RubyGems 1.3 fails on windows (undefined method `uid' for nil:NilClass)

Detailed description
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.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-04-26 17:48
Sender: Dustin Carver

This is happening to me in 1.3.2, on Windows.
Date: 2008-10-29 16:23
Sender: Luis Lavena

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


Attached Files:

Name Description Download
No Files Currently Attached

Changes:

Field Old Value Date By
status_idOpen2008-10-29 16:23luislavena
resolution_idNone2008-10-29 16:23luislavena
assigned_tonone2008-10-29 16:23luislavena
close_date2008-10-29 16:232008-10-29 16:23luislavena