# Please help!

**URL:** <https://www.ruby-forum.com/t/please-help/124406>\
**Category:** Ruby\
**Created:** [December 28, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/please-help/124406 "2007-12-28T13:15:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pradeepta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@pradeepta](https://www.ruby-forum.com/u/pradeepta)\
**Post date:** [December 28, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/please-help/124406/1 "2007-12-28T13:15:54Z")

</div>

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 !!!

---

<div class="post-metadata">

**Author:** ![pradeepta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ee59a6/32.png) [@pradeepta](https://www.ruby-forum.com/u/pradeepta)\
**Post date:** [December 28, 2007, 2:29pm UTC](https://www.ruby-forum.com/t/please-help/124406/2 "2007-12-28T14:29:31Z")

</div>

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

> Datum: Fri, 28 Dec 2007 21:15:51 +0900  
> Von: Pradeepta S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> An: removed\_email\_address@domain.invalid  
> 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 🙂

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](http://ruby-oci8.rubyforge.org/svn/tags/ruby-oci8-1.0.0-rc2/NEWS) )

This article:

[http://wiki.rubyonrails.com/rails/pages/HowtoConnectToOracle](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:

> **[How to change your Rails database adapter from OCI to Oracle](https://blog.andrewbeacock.com/2007/06/how-to-change-your-rails-database.html)**
>
> I've started to use Rails migrations recently connecting to an Oracle database. After reading many examples of how to configure the data...

Best regards,

Axel
