Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing ruby-oci8 gem #5382

Closed
braham-shakti opened this issue Oct 24, 2018 · 3 comments
Closed

Error installing ruby-oci8 gem #5382

braham-shakti opened this issue Oct 24, 2018 · 3 comments
Milestone

Comments

@braham-shakti
Copy link

Can you please help me how do I install ruby-oci8 gem?

I am using jruby 1.7.27 with rails 3.1.12 but when I am running jruby -S bundle install it throws below error

Fetching ruby-oci8 2.2.6.1
Installing ruby-oci8 2.2.6.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

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

extconf failed, uncaught signal 1

Gem files will remain installed in
/home/user/.rvm/gems/jruby-1.7.27@jruby/gems/ruby-oci8-2.2.6.1 for inspection.
Results logged to
/home/user/.rvm/gems/jruby-1.7.27@jruby/extensions/universal-java-1.8/1.9/ruby-oci8-2.2.6.1/gem_make.out

An error occurred while installing ruby-oci8 (2.2.6.1), and Bundler cannot continue. Make sure that `gem install ruby-oci8 -v '2.2.6.1' --source 'http://rubygems.org/'` succeeds before bundling.

In Gemfile:
ruby-oci8

my .jrubyrc file has cext.enabled=true, but still same error, Please help Thanks

@headius headius added this to the Won't Fix milestone Oct 25, 2018
@headius
Copy link
Member

headius commented Oct 25, 2018

JRuby's C extension support was only experimental in 1.6 and removed after that due to lack of performance and stability. ruby-oci8 will not be supported on JRuby unless it can be improved to not use the native OCI driver (or if it could use it via FFI).

@headius headius closed this as completed Oct 25, 2018
@J-QA
Copy link

J-QA commented Nov 5, 2020

@headius, by any chance, is ruby-oci8 supported on jruby 9.2.7.0?

@headius
Copy link
Member

headius commented Nov 9, 2020

@J-QA No C extensions are supported by JRuby since 1.6, and that support was very partial and very slow.

For Oracle support in Rails, we recommend the https://github.com/rsim/oracle-enhanced adapter which has solid support for JRuby. If for some reason you need a lower-level library we recommend Sequel or calling into Java's JDBC API directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants