Question

Trying to install ruby-oci8 with jruby gemset. It's giving me below error

I've tried to use export JRUBY_OPTS="--1.9 -Xcext.enabled=true" as suggested in other similar questions with no luck.


$ jruby -S gem install ruby-oci8
Fetching: ruby-oci8-2.1.7.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-oci8:
ERROR: Failed to build gem native extension.

/home/user/.rvm/rubies/jruby-1.7.5/bin/jruby extconf.rb
/home/user/.rvm/rubies/jruby-1.7.5/lib/ruby/shared/mkmf.rb:14: Use RbConfig instead of obsolete and deprecated Config.
mkmf.rb can't find header files for ruby at /home/user/.rvm/rubies/jruby-1.7.5/lib/native/include/ruby/ruby.h


Gem files will remain installed in /home/oracle/.rvm/gems/jruby-1.7.5/gems/ruby-oci8-2.1.7 for inspection.
Results logged to /home/oracle/.rvm/gems/jruby-1.7.5/gems/ruby-oci8-2.1.7/ext/oci8/gem_make.out
Was it helpful?

Solution

We can use JDBC, instead of oci8. oci8 needs c extenssions which has been deprecated in jruby.

See this for a working example :: https://gist.github.com/rogerleite/217543

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top