# Oracle connection problem

**URL:** <https://www.ruby-forum.com/t/oracle-connection-problem/124393>\
**Category:** Ruby\
**Created:** [December 28, 2007, 9:26am UTC](https://www.ruby-forum.com/t/oracle-connection-problem/124393 "2007-12-28T09:26:09Z")\
**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, 9:26am UTC](https://www.ruby-forum.com/t/oracle-connection-problem/124393/1 "2007-12-28T09:26:09Z")

</div>

Hi ,  
I am using oracle client 9.2 ,ruby 1.8.6 and oci8 is installed .but  
when i am trying to connect to oracle using the code :

equire ‘oci8’  
conn = OCI8.new(“ftdam”, “ftdam”,“host.string”)

it is giving me error like this one :

c:/rubyapps/lib/ruby/site\_ruby/1.8/oci8.rb:51:in `init': OCI Library Initialization Error (OCIError) from c:/rubyapps/lib/ruby/site_ruby/1.8/oci8.rb:51 from c:/rubyapps/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in`gem\_original\_require’  
from  
c:/rubyapps/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require’  
from ip\_authenticate\_oracle.rb:1

What is the problem and how to fix it .  
I am able to connect to oracle using the same user name,password and  
host string using sqlplus.

---

<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:21pm UTC](https://www.ruby-forum.com/t/oracle-connection-problem/124393/2 "2007-12-28T13:21:00Z")

</div>

Hi,

On Dec 28, 2007 5:26 PM, Pradeepta S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> c:/rubyapps/lib/ruby/site\_ruby/1.8/oci8.rb:51:in `init’: OCI Library  
> Initialization Error (OCIError)  
> (snip)  
> What is the problem and how to fix it .  
> I am able to connect to oracle using the same user name,password and  
> host string using sqlplus.

A thread in the following link may help you.  
[http://rubyforge.org/forum/forum.php?thread\_id=19973&forum\_id=1078](http://rubyforge.org/forum/forum.php?thread_id=19973&forum_id=1078)
