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

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:

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/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 
Results logged to 

Similar errors have been reported in some AskUbuntu questions:


The reason I think the issue is related to this bug is that the
problematic command line is built from Gem.bin_path at

    "#{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

Pkg-ruby-extras-maintainers mailing list

Reply via email to