[Rubygems-developers] repackaging rubygems and no such file to load -- rubygems (LoadError)

m.zeckinger m.zecko at gmail.com
Wed Apr 11 04:27:15 EDT 2007

hello guys, i came across the part in you faq that says "No such file
to load—rubygems", because i experience the same problem.
your answer still didn't tell me much about what can be the real
problem there. i am currently trying to repackage software on osx,
(ruby and rubygems), to be included in an installer-package.
how would i install rubygems in this case?
i tried it the following way:

ruby setup.rb config --prefix=/usr/local
ruby setup.rb install

but still, when i install the package on another system, i get the errors.
/usr/local/bin/gem:9:in `require': no such file to load -- rubygems (LoadError)
        from /usr/local/bin/gem:9

another try:

ruby setup.rb config --prefix=/usr/local
ruby setup.rb install --prefix=$PREFIX

then i tried to deinstall my local ruby and building from the just
freshly compiled ruby, via

$PREFIX/bin/ruby setup.rb config --prefix=/usr/local
$PREFIX/bin/ruby setup.rb install --prefix=$PREFIX

which resulted in another problem:
dyld: Symbol not found: _ruby_init_stack
  Referenced from:
  Expected in: /usr/lib/libruby.dylib

this obviously doesn't work, since i cannot install rubygems from the
not-yet-installed ruby.
please, guys, can you make this more clear and tell me what to do to
repackage rubygems?

thanks a lot!

More information about the Rubygems-developers mailing list