I wrote a gem that calls a Java library using RVM if running under MRI
Ruby, and just calls the Java library in the same (J)Ruby VM when
I’ve built the gem in JRuby, installed it, and required it in (a JRuby)
However, I have another gem that is dependent on it, and I can’t get it
to try to build rjb.
I have a feeling it has something to do with the gemspec, but I’m not
sure. Assuming my gem’s name is ‘cv’ (it’s not), here’s what I think is
the relevant code in the gemspec:
is_jruby = /java/ === RUBY_PLATFORM
spec.platform = ‘java’ if is_jruby
spec.add_dependency “cv”, “>= 0.3.1”
spec.add_dependency “cv”, “>= 0.1.0”
spec.add_dependency “yajl-ruby” # For JSON parsing
Any idea what I might be doing wrong? The error message I get when
bundler is below.
RbConfig instead of obsolete and deprecated Config.
mkmf.rb can’t find header files for ruby at
extconf failed, uncaught signal 1
Gem files will remain installed in
/Users/kbennett/.rvm/gems/jruby-1.7.10/gems/rjb-1.4.9 for inspection.
Results logged to
An error occurred while installing rjb (1.4.9), and Bundler cannot
Make sure that
gem install rjb -v '1.4.9' succeeds before bundling.