1

Closed

require 'rubygems' fails for 64Bit Process

description

When attempting to require 'rubygems' from a 64bit process and error occurs saying that you cannot call the Win32API from a 64bit process.
 
Bug tracked down to $IRHOME\lib\ruby\site_ruby\1.8\rubygems\config_file.rb
 
File make explicit use of the Win32API. We replaced this with equivalent ruby code and it works fine. The call is used inside an ELSE block, the IF block above also uses Win32API explicitly for loading under ruby1.9. As we are not running 1.9 we did not modify this, however it will likely need to be fixed as well.
 
Attached is our patched file.

file attachments

Closed Jul 28, 2011 at 3:45 PM by jimmysch
Confirmed

comments

TomasMatousek wrote Oct 21, 2010 at 9:26 PM

ir64
IronRuby 1.1.1.0 on .NET 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
require 'rubygems'
=> true
Seems to work with 1.9 gems. Win32API is still not supported in 64bit processes but seems like Rubygems don't need it anymore.