【问题标题】:Installing ruby-oci8 with jruby使用 jruby 安装 ruby​​-oci8
【发布时间】:2014-05-02 06:50:12
【问题描述】:

尝试使用 jruby gemset 安装 ruby​​-oci8。它给了我以下错误

我尝试使用export JRUBY_OPTS="--1.9 -Xcext.enabled=true",正如其他类似问题中所建议的那样,但没有成功。


$ 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

【问题讨论】:

    标签: jruby ruby-c-extension


    【解决方案1】:

    我们可以使用 JDBC,而不是 oci8。 oci8 需要 c 扩展,在 jruby 中已弃用。

    查看此示例以获取工作示例 :: https://gist.github.com/rogerleite/217543

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-12-23
      • 2013-11-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-01
      相关资源
      最近更新 更多