Skip to content

Instantly share code, notes, and snippets.

@hiroyuki-sato
Last active February 16, 2016 14:13
Show Gist options
  • Save hiroyuki-sato/b71049e3dfb20e5408fb to your computer and use it in GitHub Desktop.
Save hiroyuki-sato/b71049e3dfb20e5408fb to your computer and use it in GitHub Desktop.
gem install sisimai on jruby
% ruby -v
jruby 9.0.4.0 (2.2.2) 2015-11-12 b9fb7aa Java HotSpot(TM) 64-Bit Server VM 25.31-b07 on 1.8.0_31-b13 +jit [darwin-x86_64]
% gem install sisimai
Building native extensions.  This could take a while...
ERROR:  Error installing sisimai:
	ERROR: Failed to build gem native extension.

    /path/to/home/.rbenv/versions/jruby-9.0.4.0/bin/jruby -r ./siteconf20160216-35142-198flf6.rb extconf.rb
NotImplementedError: C extensions are not supported
    <top> at /path/to/home/.rbenv/versions/jruby-9.0.4.0/lib/ruby/stdlib/mkmf.rb:1
  require at org/jruby/RubyKernel.java:939
   (root) at /path/to/home/.rbenv/versions/jruby-9.0.4.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
    <top> at extconf.rb:1

extconf failed, exit code 1

Gem files will remain installed in /path/to/home/.rbenv/gems/2.2.0/gems/oj-2.14.4 for inspection.
Results logged to /path/to/home/.rbenv/gems/2.2.0/extensions/universal-java-1.8/2.2.0/oj-2.14.4/gem_make.out
source 'https://rubygems.org'
# Specify your gem's dependencies in sisimai.gemspec
gemspec
group :development, :test do
gem 'coveralls', require: false
end
platforms :jruby do
gem 'jrjackson', '>= 0.3.8'
end
platforms :ruby do
gem 'oj', '>= 2.14.4'
end
@azumakuniyuki
Copy link

I've tested on JRuby 9.0.5.0 on FreeBSD and got the same error message when "jgem install sisimai".

# uname -mprs
FreeBSD 10.1-RELEASE-p24 amd64 amd64

# /usr/local/bin/java -version
openjdk version "1.7.0_95"
OpenJDK Runtime Environment (build 1.7.0_95-b00)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)

# /usr/local/jruby/bin/jruby -v
jruby 9.0.5.0 (2.2.3) 2016-01-26 7bee00d OpenJDK 64-Bit Server VM 24.95-b01 on 1.7.0_95-b00 +jit [FreeBSD-amd64]
# /usr/local/jruby/bin/jgem install sisimai
Fetching: oj-2.14.4.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing sisimai:
    ERROR: Failed to build gem native extension.

    /usr/local/jruby/bin/jruby -r ./siteconf20160216-13461-17h6cbz.rb extconf.rb
NotImplementedError: C extensions are not supported
    <top> at /usr/local/jruby/lib/ruby/stdlib/mkmf.rb:1
  require at org/jruby/RubyKernel.java:937
   (root) at /usr/local/jruby/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
    <top> at extconf.rb:1

extconf failed, exit code 1

Gem files will remain installed in /usr/local/jruby/lib/ruby/gems/shared/gems/oj-2.14.4 for inspection.
Results logged to /usr/local/jruby/lib/ruby/gems/shared/extensions/universal-java-1.7/2.2.0/oj-2.14.4/gem_make.out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment