tonytonyjan / jaro_winkler

Ruby & C implementation of Jaro-Winkler distance algorithm which supports UTF-8 string.
MIT License
193 stars 29 forks source link

can't install under JRuby #3

Closed yuki24 closed 9 years ago

yuki24 commented 9 years ago

It attempts to compile a C extension even on JRuby when it shouldn't:

$ gem i jaro_winkler
WARN: Unresolved specs during Gem::Specification.reset:
      ffi (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Fetching: jaro_winkler-1.3.4.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing jaro_winkler:
    ERROR: Failed to build gem native extension.

    /usr/local/rvm/rubies/jruby-1.7.19/bin/jruby -r ./siteconf20150401-24466-14usz70.rb extconf.rb
NotImplementedError: C extension support is not enabled. Pass -Xcext.enabled=true to JRuby or set JRUBY_OPTS.

   (root) at /usr/local/rvm/rubies/jruby-1.7.19/lib/ruby/shared/mkmf.rb:8
  require at org/jruby/RubyKernel.java:1071
   (root) at /usr/local/rvm/rubies/jruby-1.7.19/lib/ruby/shared/rubygems/core_ext/kernel_require.rb:1
   (root) at extconf.rb:1

extconf failed, uncaught signal 1

Gem files will remain installed in /usr/local/rvm/gems/jruby-1.7.19/gems/jaro_winkler-1.3.4 for inspection.
Results logged to /usr/local/rvm/gems/jruby-1.7.19/extensions/universal-java-1.7/1.9/jaro_winkler-1.3.4/gem_make.out

I'm using JRuby 1.7.19.

$ ruby -v
jruby 1.7.19 (1.9.3p551) 2015-01-29 20786bd on OpenJDK 64-Bit Server VM 1.7.0_75-b13 +jit [linux-amd64]
tonytonyjan commented 9 years ago

@yuki24 it should be fixed. try again please.

jruby-1.7.19 $ gem install jaro_winkler -v 1.3.5
Fetching: jaro_winkler-1.3.5.gem (100%)
Building native extensions.  This could take a while...
Successfully installed jaro_winkler-1.3.5
1 gem installed
yuki24 commented 9 years ago

@tonytonyjan 1.3.5 works great. Thanks!