Bugs item #27327, was opened at 2009-10-21 15:20 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=575&aid=27327&group_id=126
Category: #gem and #require methods Group: v1.3.x Status: Open Resolution: None Priority: 3 Submitted By: Vít Ondruch (voxik) Assigned to: Nobody (None) Summary: RubyGems does not work properly with upcomming Ruby 1.9.2 Initial Comment: With ruby ruby 1.9.2dev (2009-10-07) [i386-mswin32_90], coming from win32-unicode-test branch, RubyGems does not work properly anymore. The problem is in initialization of system_config_path variable. The original code is: system_config_path = begin require 'Win32API' CSIDL_COMMON_APPDATA = 0x0023 path = 0.chr * 260 SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP', 'L', :stdcall SHGetFolderPath.call nil, CSIDL_COMMON_APPDATA, nil, 1, path path.strip rescue LoadError '/etc' end but it should be replaced by the following version: system_config_path = begin require 'Win32API' CSIDL_COMMON_APPDATA = 0x0023 path = 0.chr * 260 SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPathW', 'PLPLP', 'L', :stdcall SHGetFolderPath.call nil, CSIDL_COMMON_APPDATA, nil, 1, path path.force_encoding('UTF-16LE').encode!('UTF-8') path.strip rescue LoadError '/etc' end i.e. the wide version of SHGetFolderPath should be used. However this code should be probably specific for specific Ruby versions. The problem can be reproduced for example on czech windows XP, where the method SHGetFolderPath returns following string: "c:\Documents and Settings\All Users\Data aplikací" ("c:\Documents and Settings\All Users\Application data" in EN windows), with US-ASCII encoding, which is completely wrong. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=575&aid=27327&group_id=126 _______________________________________________ Rubygems-developers mailing list http://rubyforge.org/projects/rubygems Rubygems-developers@rubyforge.org http://rubyforge.org/mailman/listinfo/rubygems-developers