This discussion is archived
8 Replies Latest reply: Sep 13, 2010 4:21 PM by 797593 RSS

Oracle drivers for Ruby1.9.1

753406 Newbie
Currently Being Moderated
Did anyone get an oracle driver with ruby1.9.1 installed? Or is there simply no support at this point in time?
  • 1. Re: Oracle drivers for Ruby1.9.1
    dvohra21 Oracle ACE
    Currently Being Moderated
    http://www.metasploit.com/redmine/issues/460

    Use Oracle enhanced adapter on Ruby 1.9.1 with ruby-oci8 2.0 library or gem


    ruby-oci8 2.0 is available
    http://rubyforge.org/frs/?group_id=256

    C:\> gem install ruby-oci8 -v 2.0.3

    http://github.com/rsim/oracle-enhanced
    gem install activerecord-oracle_enahnced-adapter

    http://www.oracle.com/technology/pub/articles/haefel-oracle-ruby.html
  • 2. Re: Oracle drivers for Ruby1.9.1
    754448 Newbie
    Currently Being Moderated
    I can't get the ruby-oci8 gem to install on my windows machine.
    It seems to be looking for a c compiler (cc)
    (Which I do not have)

    Any suggestions?

    thanks
  • 3. Re: Oracle drivers for Ruby1.9.1
    288739 Newbie
    Currently Being Moderated
    Did you install Ruby 1.9.1 from http://www.rubyinstaller.org/download.html ?

    And did you install Development Kit (which includes compilers for native extensions)?

    If yes then what kind of errors are you getting?
  • 4. Re: Oracle drivers for Ruby1.9.1
    754448 Newbie
    Currently Being Moderated
    Yes, I got the Ruby from http://www.rubyinstaller.org/download.html
    I did not get the Dev Kit, can you give me the URL?
    That might be the missing link...

    C:\Ruby19\lib\ruby\gems\1.9.1\gems\ruby-oci8-2.0.3>setup.rb config
    ---> lib
    ---> lib/dbd
    <--- lib/dbd
    ---> lib/oci8
    <--- lib/oci8
    <--- lib
    ---> ext
    ---> ext/oci8
    c:/ruby/bin/ruby C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/extconf.rb
    checking for load library path...
    PATH...
    checking c:\ruby19\bin... no
    checking C:\WINDOWS\system32... no
    checking C:\WINDOWS... no
    checking C:\WINDOWS\System32\Wbem... no
    checking C:\Program Files\ATI Technologies\ATI Control Panel... no
    checking C:\Program Files\Oracle\Instant... yes
    C:/Program Files/Oracle/Instant/oci.dll looks like an instant client.
    checking for cc... ng
    ---------------------------------------------------
    Error Message:
    C compiler doesn't work correctly.
    Backtrace:
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/oraconf.rb:562:in `check_cc'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/oraconf.rb:549:in `init'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/oraconf.rb:1001:in `initialize'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/oraconf.rb:343:in `new'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/oraconf.rb:343:in `get'
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/extconf.rb:18
    ---------------------------------------------------
    See:
    * http://ruby-oci8.rubyforge.org/en/HowToInstall.html
    * http://ruby-oci8.rubyforge.org/en/ReportInstallProblem.html

    *** C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of
    necessary libraries and/or headers. Check the mkmf.log file for more
    details. You may need configuration options.

    Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --srcdir=C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8
    --curdir
    --ruby=c:/ruby/bin/ruby
    --with-instant-client
    --without-instant-client
    C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/oraconf.rb:562:in `check_cc': RuntimeError (RuntimeError)
    from C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/oraconf.rb:549:in `init'
    from C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/oraconf.rb:1001:in `initialize'
    from C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/oraconf.rb:343:in `new'
    from C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/oraconf.rb:343:in `get'
    from C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/extconf.rb:18
    'system c:/ruby/bin/ruby C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/ext/oci8/extconf.rb ' failed
    Try 'ruby C:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby-oci8-2.0.3/setup.rb --help' for detailed usage.

    C:\Ruby19\lib\ruby\gems\1.9.1\gems\ruby-oci8-2.0.3>


    thanks
  • 5. Re: Oracle drivers for Ruby1.9.1
    754448 Newbie
    Currently Being Moderated
    I installed the RubyInstaller DevKit including the mod to fstab.
    Still gets to the checking for cc...
    and reports ng (presumably, not good)
  • 6. Re: Oracle drivers for Ruby1.9.1
    288739 Newbie
    Currently Being Moderated
    Try to describe your problem in ruby-oci8 discussion forum http://rubyforge.org/forum/forum.php?forum_id=1078

    Probably ruby-oci8 author can answer what is the issue.
  • 7. Re: Oracle drivers for Ruby1.9.1
    dvohra21 Oracle ACE
    Currently Being Moderated
    Install the ruby gem with
    C:\> gem install ruby-oci8 -v 2.0.3

    What is the error message?
  • 8. Re: Oracle drivers for Ruby1.9.1
    797593 Newbie
    Currently Being Moderated
    I'm using ruby-oci8-2.0.4 version. When i install this gem i'm getting the same error mentioned above. Help please

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points