pkgr / rubies

Ruby binaries available in DEB or RPM packages for most of the linux distributions
https://packager.io/gh/pkgr/rubies
5 stars 0 forks source link

Bundled bundler scripts reference wrong ruby version #3

Open gix opened 9 years ago

gix commented 9 years ago

The ruby-2.1 package (I used ruby-2.1_0.2.0-1415995299.9592b2c.trusty_amd64.deb) ships with bundler 1.6.3 installed. The bundler executables in /opt/ruby-2.1/lib/ruby/gems/2.1.0/bin specify the wrong Ruby version in their shebang line:

#!/usr/bin/env ruby1.9.1"
crohr commented 9 years ago

Actually the bundle executable to use is in /opt/ruby-2.1/bin/bundle, and this one has an updated shebang added. Why did you try using /opt/ruby-2.1/lib/ruby/gems/2.1.0/bin/bundle?

gix commented 9 years ago

I was using chruby to switch and for non-root users it adds $GEM_ROOT/bin to $PATH.

I'm not sure who is in the wrong here, and maybe this is an outdated path for gem executables, but if these aren't supposed to be used, maybe they could be excluded from the package?

crohr commented 9 years ago

I've actually replaced /opt/ruby-2.1/bin/bundle with a symlink to $GEM_ROOT/bin/bundle. That way both options work. I just generated new packages on https://packager.io/gh/pkgr/rubies. Could you tell me if that fixes your issue?

gix commented 9 years ago

The bundle executable looks for ruby in the same directory which fails for the one in $GEM_ROOT/bin.