Please help!

I have installed dbi,oci8,ruby 1.8.6 ,oracle client 9.2 on XP machine
I have tried to connect a remote database using the code

dbh = DBI.connect(‘DBI:OCI8:ORCL’,‘ftdam’,‘ftdam’)

where ORCL is the configuration file tnsnames.ora file.
but I am unable to connect .It is giving error like :

OCI Library Initialization Error

I can connect to the databse using same username ,password and
host string 'ORCL 'in sqlplus .but can’t through ruby program ,Anybody
help !!!

-------- Original-Nachricht --------

Datum: Fri, 28 Dec 2007 21:15:51 +0900
Von: Pradeepta S. [email protected]
An: [email protected]
Betreff: please help !

I have installed dbi,oci8,ruby 1.8.6 ,oracle client 9.2 on XP machine
I have tried to connect a remote database using the code

dbh = DBI.connect(‘DBI:OCI8:ORCL’,‘ftdam’,‘ftdam’)

Dear Pradeepta,

please be more specific in your email headers - you’ll
get more replies from people who are actually
competent for your problem :slight_smile:

From your error message, there appears to be a problem about the file
oci8lib.so (see here:

http://ruby-oci8.rubyforge.org/svn/tags/ruby-oci8-1.0.0-rc2/NEWS )

This article:

http://wiki.rubyonrails.com/rails/pages/HowtoConnectToOracle

describes a way to connect to Oracle from Ruby on Rails
( you don’t seem to be using it, but nevertheless), so
assuming that you did everything right as described there and
things don’t work nevertheless, I’d suggest you try out
using ‘oracle’ rather than ‘oci’ as an adapter, which is supposed
to be newer, as described here:

http://blog.andrewbeacock.com/2007/06/how-to-change-your-rails-database.html

Best regards,

Axel

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs