RubyGems 1.3 fails on windows (undefined method `uid' for nil:NilClass)
[
2008/10/28 12:01 | by xeric ]
2008/10/28 12:01 | by xeric ]
升级gem到1.3.0后,直接建项目都出问题,执行除gem -v命令外的所有gem命令均出现下述问题,rubyforge如是解决,测试生效,备份。
地址:http://rubyforge.org/track...
[#22226] RubyGems 1.3 fails on windows (undefined method `uid' for nil:NilClass)
Date:
2008-09-29 16:30 Priority:
3
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.
地址:http://rubyforge.org/track...
[#22226] RubyGems 1.3 fails on windows (undefined method `uid' for nil:NilClass)
Date:
2008-09-29 16:30 Priority:
3
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.
谈Groovy为Java做单元测试
The single-table inheritance mechanism failed to locate the subclass

