# Oracle connection problem

**URL:** <https://rubytalk.org/t/oracle-connection-problem/43362>\
**Category:** ruby-talk\
**Created:** [28 December 2007 08:26 UTC](https://rubytalk.org/t/oracle-connection-problem/43362 "2007-12-28T08:26:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pradeepta\_Swain](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@Pradeepta\_Swain](https://rubytalk.org/u/Pradeepta_Swain)\
**Post date:** [28 December 2007 08:26 UTC](https://rubytalk.org/t/oracle-connection-problem/43362/1 "2007-12-28T08:26:10Z")

</div>

Hi ,  
&nbsp;&nbsp;&nbsp;&nbsp;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)  
&nbsp;&nbsp;from c:/rubyapps/lib/ruby/site\_ruby/1.8/oci8.rb:51  
&nbsp;&nbsp;from  
c:/rubyapps/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem\_original\_require'  
&nbsp;&nbsp;from  
c:/rubyapps/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require'  
&nbsp;&nbsp;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.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![KUBO\_Takehiro](https://avatars.discourse-cdn.com/v4/letter/k/3be4f8/32.png) [@KUBO\_Takehiro](https://rubytalk.org/u/KUBO_Takehiro)\
**Post date:** [28 December 2007 12:19 UTC](https://rubytalk.org/t/oracle-connection-problem/43362/2 "2007-12-28T12:19:18Z")

</div>

Hi,

> Hi ,  
> &nbsp;&nbsp;&nbsp;&nbsp;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)

(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.  
&nbsp;&nbsp;[http://rubyforge.org/forum/forum.php?thread\_id=19973&forum\_id=1078](http://rubyforge.org/forum/forum.php?thread_id=19973&forum_id=1078)

> **···**
>
> On Dec 28, 2007 5:26 PM, Pradeepta Swain \<pradeepta.swain@hcl.in\> wrote:
