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

Mark Hubbart discordantus at gmail.com
Tue Apr 17 15:17:10 EDT 2007


Hi,
I am working with those who are trying to package rubygems (for a gui
installation package on OSX) and I think I  may have found a bug in
the post-install hook (which installs the "sources" gem). It seems
that the post-install hook doesn't honor the install-prefix (in
@options['install-prefix']). So doing this:

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

...installs rubygems in ../stage/usr/local/, but automatically
installs the sources gem is in /usr/local/.

I'm working on a patch for this, hopefully I'll have time to figure
out exactly what's going on here (my first couple fixes didn't work.)

cheers,
Mark

On 4/11/07, Chad Woolley <thewoolleyman at gmail.com> wrote:
> Here's what I do to make a test installation of rubygems:
>
>   class RubyGemsInstaller
>     attr_writer :install_dir
>     attr_writer :rubygems_dist_dir
>
>     def install
>       install_dir = File.expand_path(@install_dir)
>       rubygems_dist_dir = File.expand_path(@rubygems_dist_dir)
>       ENV['GEM_HOME'] = "#{install_dir}"
>       setup_cmd = "ruby setup.rb"
>       Dir.chdir("#{rubygems_dist_dir}") do
>         `#{setup_cmd} config --prefix=#{install_dir}`
>         `#{setup_cmd} setup`
>         `#{setup_cmd} install`
>       end
>     end
>   end
>
> ...although I've never done this on a system without rubygems already
> installed, and I still end up using the executables from the main
> installation.
>
> -- Chad
>
> On 4/11/07, m. zeckinger <m.zecko at gmail.com> wrote:
> > 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
> > --prefix=/UB/compile/Distribution_folder/Package_Root/usr/local
> >
> > 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:
> > PREFIX="/UB/compile/Distribution_folder/Package_Root/usr/local"
> > GEM_HOME=$PREFIX/lib/ruby/gems/1.8
> > RUBYLIB=$PREFIX/lib/ruby:$PREFIX/lib/site_ruby/1.8
> >
> > 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:
> > /UB/compile/Distribution_folder/Package_Root/usr/local/bin/ruby
> >   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!
> > mz
> > _______________________________________________
> > Rubygems-developers mailing list
> > Rubygems-developers at rubyforge.org
> > http://rubyforge.org/mailman/listinfo/rubygems-developers
> >
> _______________________________________________
> Rubygems-developers mailing list
> Rubygems-developers at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rubygems-developers
>


More information about the Rubygems-developers mailing list