ruby - native gem installs fine on 1.9.3 but fails on 2.0.0 -
a private gem native extensions have had worked fine since ruby 1.8.2 , 1.9.3 failing in wird mode install on ruby 2.0.0. instead of installing required shared object .so
file, copies executable. there not changes gem sources, going ruby 1.9.3 (and it's gemset) works fine.
here relevant 2.0.0-p0 verbose output gem install
:
linking shared-object mygem/mygem.so make install /usr/bin/install -c -m 0755 mygem.so /home/remus/.rvm/gems/ruby-2.0.0-p0/gems/mygem-0.1.12/lib/mygem installing default mygem libraries installed mygem-0.1.12 ... 1 gem installed
and these artifacts installed:
$ ls -al total 2252 -rwxr-xr-x 1 remus remus 2289443 may 4 13:08 mygem -rw-rw-r-- 1 remus remus 62 may 4 13:08 mygem.rb
for comparison 1.9.3-p194 output is:
linking shared-object mygem/mygem.so make install /usr/bin/install -c -m 0755 mygem.so /home/remus/.rvm/gems/ruby-1.9.3-p194/gems/mygem-0.1.12/lib/mygem installing default mygem libraries installed mygem-0.1.12 1 gem installed
and installed artifacts:
ls -al total 16 drwxrwxr-x 2 remus remus 4096 may 4 13:06 mygem -rw-rw-r-- 1 remus remus 62 may 4 13:06 mygem.rb ls -al mygem total 2760 -rwxr-xr-x 1 remus remus 2810959 may 4 13:06 mygem.so
- ruby 2.0.0-p0: rake (10.0.4, 0.9.6), rake-compiler (0.8.3), hoe (3.6.0)
- ruby 1.9.3-p194: rake (10.0.4, 10.0.3, 0.9.2.2), rake-compiler (0.8.1), hoe (3.4.0, 3.0.8)
so, without seeing mygem.gemspec
file, can't sure, suspect you've got wrong files listed in there. example, here's abridged gemspec based on 1 used nmatrix, uses rake-compiler
:
lib = file.expand_path('../lib/', __file__) $:.unshift lib unless $:.include?(lib) require 'nmatrix/version' gem::specification.new |gem| gem.name = "nmatrix" gem.files = `git ls-files`.split("\n") gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") # vvv line vvv gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| file.basename(f) } # ^^^ line ^^^ gem.extensions = ['ext/nmatrix/extconf.rb'] gem.require_paths = ["lib"] gem.required_ruby_version = '>= 1.9.2' gem.add_development_dependency 'rake', '~>0.9' gem.add_development_dependency 'bundler' gem.add_development_dependency 'rake-compiler', '~>0.8.1' end
tl;dr: might try looking @ line gem.executables
, make sure have relevant files included.
Comments
Post a Comment