[DRE-maint] Bug#711079: check the Ruby LOAD_PATH

Alex Young alex at blackkettle.org
Sun Jun 16 09:44:43 UTC 2013


On Sat, 2013-06-15 at 14:38 +0200, Cédric Boutillier wrote:
> Hi,
> 
> > The /usr/bin/bundle binary supplied by the bundler package uses
> > "#!/usr/bin/env ruby" as its shebang line.  This means that when I run
> > `bundle install` with a non-system ruby enabled, and I don't have the
> > bundler gem separately installed, the `bundle install` command fails
> > with the following output:
> 
> > $ bundle install
> > /home/alex/.rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require': cannot load such file -- bundler (LoadError)
> 
> > from /home/alex/.rubies/ruby-2.0.0-p195/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
> >     from /usr/bin/bundle:2:in `<main>'
> 
> > This is specifically a problem when using chruby (and chruby-exec) to
> > select the activated ruby.
> 
> > The `bundle` package should specify the system ruby to run with,
> > otherwise `require "bundler"` will fail to see the installed libraries
> > at /usr/lib/ruby/vendor_ruby/bundler.  Replacing the shebang line with
> > "#!/usr/bin/ruby" fixes this.
> 
> 
> I think the problem you see is caused by the fact that your personal
> Ruby interpreter does not know where to find system Ruby libraries. You
> need to check that /usr/lib/ruby/vendor_ruby/ and related are added to
> the $LOAD_PATH of your interpreter. You may need to use the RUBYLIB
> environment variable for that.
> 

I was hoping to be able to keep my personal ruby entirely isolated from
the system and still be able to run system binaries without them
breaking, but it looks, one way or another, like binary gems make that
impossible in bundler's case.  Drat.

-- 
Alex



More information about the Pkg-ruby-extras-maintainers mailing list