Issue #4941 has been updated by stephen gooberman-hill.


Hi,
I'm not sure that this is a non-issue. I have been cross compiling ruby for an ARM embedded device. I am compiling on i686 machine build#, for arm-linux machine target#

The target machine setup is
target# ls -l /usr/local
  /usr/local -> /mnt/flash #initially empty

so on my build machine I create a new directory matching the target machine directory
build#  mkdir /mnt/flash

I will install ruby into this directory, then copy it over onto the target machine. The build and target machine have exactly the same paths for the built ruby installation, so lib/ruby etc are all in exactly the same places.

Now I build ruby on the build machine
build# ./configure --host=arm-linux --build=i686-linux CC=path/to/arm-cc --prefix /mnt/flash
...
build# make;make install

then copy /mnt/flash on build to /mnt/flash on target

then try running
target# ruby -v
ruby 1.9.3p0 (2011-10-30 revision 33570) [i386-linux]

target# irb
irb(main):001:0>

but

target# ruby -e 'p "hello"'
<internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError)
        from <internal:gem_prelude>:1:in `<compiled>'

I can workaround this issue by
 
target# ruby --disable-gems -e 'p "hello"'
"hello"

but surely I shouldn't have to. My understanding is that the install process should build everything correctly onto a bare machine, no matter what architecture.

Thoughts?

Steve
----------------------------------------
Bug #4941: cannot load such file -- rubygems.rb (LoadError)
https://bugs.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://bugs.ruby-lang.org/