Issue #4941 has been updated by Lazaridis Ilias.

File gem_prelude_v2.diff added

Eric Hodel wrote:
> This patch does not pick up the proper rbconfig.rb

Based on my tests, ./rbconfig.rb is the correct file ("nmake test" uses the same file).

Please correct if this is wrong.

> nor compiled executables like zlib, socket or openssl.
[...]

The patch was a quick workaround, to make things work for me and to demonstrate that it's not necessary to block ruby when running from the source tree.

I've attached an updated patch, which adds 4 directories to the $LOAD_PATH (those should be all relevant ones).

The patch is still a workaround, if you reopen the issue, then I (or we) can workout on a production-quality patch.
----------------------------------------
Bug #4941: cannot load such file -- rubygems.rb (LoadError)
http://redmine.ruby-lang.org/issues/4941

Author: Lazaridis Ilias
Status: Rejected
Priority: Normal
Assignee: Usaku NAKAMURA
Category: core
Target version: 
ruby -v: ruby 1.9.3dev (2011-06-28 trunk 32265) [i386-mswin32_90]


=begin

From within the directory of a fresh trunk checkout:

$ win32\configure
$ nmake
$ miniruby -e"p 'hello'" #=> hello
$ ruby -e"p 'hello'"

 <internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
        from <internal:gem_prelude>:1:in `<compiled>'

(the exact same procedure using branch 1.9.2 worked fine)
=end



-- 
http://redmine.ruby-lang.org