`init': OCI Library Initialization Error (DBI::DatabaseError

Discussion in 'Ruby' started by Namit Jain, Aug 20, 2009.

  1. Namit Jain

    Namit Jain Guest

    Hi All

    I tried to connect Oracle with Ruby but on executing the ruby script it
    gave the following error

    `init': OCI Library Initialization Error (DBI::DatabaseError}.

    To connect to DB I had the following configuration

    Installed Ruby 1.8.6
    I verified that OCI.dll is present in bin folder of Oracle.
    Included oci8.rb in the script.

    My test script just uses a single query to get result form the DB.
    Which is
    resultSet1=fireQuery('SELECT item_id FROM item WHERE item_id
    =?',4120788)

    This script require another rb file that is DBConnect(I have attached
    this file for everyone's reference)



    The error displayed refers to the line no 52 of oci8.rb which is
    "@@env = OCIEnv.init()"I read several documentation but still I am not
    able to figure out where the problem is. Online search showed that
    oraociei10.dll should be present where the oci.dll is present. I did
    this also and copied this dll where the oci.dll is present but still I
    got the same error.

    Please let me know where I am going error. Sorry If I am doing some
    fundamental thing wrong, but please help me out.

    Please Ask for more information in case I have missed out something.

    Any kind of help will be highly appreciated

    Thanks
    Namit

    Attachments:
    http://www.ruby-forum.com/attachment/3952/DBConnect.rb

    --
    Posted via http://www.ruby-forum.com/.
     
    Namit Jain, Aug 20, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RTJ
    Replies:
    2
    Views:
    4,096
    Sanjay Rana
    Sep 27, 2006
  2. Replies:
    1
    Views:
    692
    Jules
    Aug 18, 2005
  3. Jess
    Replies:
    4
    Views:
    468
  4. Dheeraj Gambhir

    OCIError: OCI Library Initialization Error

    Dheeraj Gambhir, Jul 21, 2009, in forum: Ruby
    Replies:
    1
    Views:
    443
    Dheeraj Gambhir
    Jul 22, 2009
  5. Dheeraj Gambhir
    Replies:
    2
    Views:
    523
    Dheeraj Gambhir
    Jul 27, 2009
Loading...

Share This Page