[DRE-maint] Bug#529663: rubygems1.8: Gem::Ext::RakeBuilder uses the wrong executable name for rake
Ken Bloom
kbloom at gmail.com
Wed May 20 20:31:38 UTC 2009
Package: rubygems1.8
Version: 1.3.2-1
Severity: important
SYMPTOMS:
=========
Trying to install the ffi gem in Debian's ruby 1.8, I get the
following error:
[bloom at cat-in-the-hat ~]$ gem install ffi
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
rake1.8 RUBYARCHDIR=/home/bloom/.gem/ruby/1.8/gems/ffi-0.3.5/lib RUBYLIBDIR=/home/bloom/.gem/ruby/1.8/gems/ffi-0.3.5/lib
sh: rake1.8: command not found
I have rake installed from Debian's rake package, and the binary to
run rake is /usr/bin/rake (so no rake 1.8 exists).
ii rake 0.8.4-1 a ruby build program
CAUSE:
======
Ultimately, this is a rubygems problem in
/usr/lib/ruby/1.8/rubygems/ext/rake_builder.rb
Rubygems determines the rake command to run by executing:
cmd = ENV['rake'] || Gem.bin_path('rake') rescue Gem.default_exec_format % 'rake'
So let's check:
ENV['rake']
--> not set (though this will give me a workaround in the meantime)
Gem.bin_path('rake')
--> rake isn't installed from a gem -- it's from the debian package
Gem.default_exec_format % 'rake'
--> Gem.default_exec_format is "%s1.8", so when formatting "rake"
with that, we get rake1.8, a binary that doesn't exist.
WORKAROUND:
===========
$ rake=/usr/bin/rake gem install ffi
PROPOSED SOLUTION:
==================
In the short term, add a check to see if /usr/bin/rake is installed,
and if so then use that.
In the longer term, it would help to create some sort of equivalence
mechanism so that Ruby can identify debian packages as being
equivalent to gems.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.29-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages rubygems1.8 depends on:
ii rdoc1.8 1.8.7.72-3.1 Generate documentation from Ruby s
ii ruby1.8 1.8.7.72-3.1 Interpreter of object-oriented scr
rubygems1.8 recommends no packages.
Versions of packages rubygems1.8 suggests:
ii build-essential 11.4 Informational list of build-essent
ii ruby1.8-dev 1.8.7.72-3.1 Header files for compiling extensi
pn rubygems-doc <none> (no description available)
-- no debconf information
More information about the Pkg-ruby-extras-maintainers
mailing list