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

Cédric Boutillier cedric.boutillier at gmail.com
Sat Jun 15 12:38:31 UTC 2013


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.

Cheers,

Cédric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20130615/796fce21/attachment.sig>


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