On Wed, 2013-06-05 at 21:35 +0200, Paul van Tilburg wrote: > On Sun, Jun 02, 2013 at 07:18:00PM +0200, Christian Hofstaedtler wrote: >> there is a problem with rubygems-integration in which it fails to >> properly override the binary path for gems. >> >> This is mostly seen when having bin stubs from previously installed >> gems in /usr/local/bin [...] > > [...] > > It seems that the problem occurs if a "older" gem with a program is > installed while already the same but newer is installed via Debian and > rubygem-intergration. (That is why I explicitly install rake 0.9.0, while > Debian Wheezy has 0.9.2.2.)
I think this issue also occurs on Jessie (and testing/unstable) when installing a gem native extension. To reproduce in a fresh chroot: # apt-get -y install ruby $ GEM_HOME=~/.gem gem install rainbow This produces the following output on my system: -8<------------------------------------------------------------------- Building native extensions. This could take a while... ERROR: Error installing rainbow: ERROR: Failed to build gem native extension. current directory: /home/user/.gem/gems/rainbow-2.2.2/ext /usr/bin/ruby2.3 mkrf_conf.rb current directory: /home/user/.gem/gems/rainbow-2.2.2/ext /usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-12.0.0/exe/rake RUBYARCHDIR=/home/user/.gem/extensions/x86_64-linux/2.3.0/rainbow-2.2.2 RUBYLIBDIR=/home/user/.gem/extensions/x86_64-linux/2.3.0/rainbow-2.2.2 /usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-12.0.0/exe/rake (LoadError) rake failed, exit code 1 Gem files will remain installed in /home/user/.gem/gems/rainbow-2.2.2 for inspection. Results logged to /home/user/.gem/extensions/x86_64-linux/2.3.0/rainbow-2.2.2/gem_make.out -8<------------------------------------------------------------------- Similar errors have been reported in some AskUbuntu questions: https://askubuntu.com/q/872399 https://askubuntu.com/q/567423 The reason I think the issue is related to this bug is that the problematic command line is built from Gem.bin_path at lib/rubygems/ext/rake_builder.rb:23: "#{Gem.ruby} -rubygems #{Gem.bin_path('rake', 'rake')}" Is there a workaround for installing gem native packages other than `sudo gem install`? -- Thanks, | ke...@kevinlocke.name | XMPP: ke...@kevinlocke.name Kevin | https://kevinlocke.name | IRC: kevinoid on freenode