--------------060601080200060400080905
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Andre,
        
         The problem occured at "OCIEnv.create(OCI_OBJECT); 
oci8_env_s_create;" when loading ruby-oci8 driver, before connecting to 
the db server.
         Firstly you can check what Paul suggested. I think your codes 
are correct, which have been validated on my machine. Besides, I'd like 
to ask you the following:
1) Is your OracleXE DB loacated on the machine from where you ran your 
codes? If not, have you installed Oracle Instant Client on the machine 
from where you ran your codes?
2) Can you tell us what the sizes of your file 
E:/ruby/lib/ruby/site_ruby/1.8/oci8.rb and file 
E:/ruby/lib/ruby/site_ruby/1.8/oci8lib.so are? Also the exact version of 
your ruby-oci8, and the exact version of your OracleXE DB server? To try 
reinstalling your ruby-oci8 driver is a method too.
         Hope you can succeed.

Shiwei
The views expressed are my own and not necessarily those of Oracle and 
its affiliates.

Paul Lutus wrote:

>andre hartawan wrote:
>
>  
>
>>Need an advice please,
>>
>>I have an error while trying to connect ruby to
>>oracle.
>>u can see the error below.What should I do ?
>>
>>E:\ruby\bin>ruby -r oci8 -e "OCI8.new('hr', 'hr',
>>'//10.10.xx.xx:1521/oradbx').
>>exec('select * from JOBS') do |r| puts r.join(',');
>>end"
>>E:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:49:in `create':
>>ERROR (OCIError)
>>        from E:/ruby/lib/ruby/site_ruby/1.8/oci8.rb:49
>>    
>>
>
>1. Have you been able to connect to Oracle using this method before now? In
>other words, is this your first effort to connect, or is this the first
>time you have had a problem connecting?
>
>2. Is the Oracle server running on the provided address and port?
>
>3. Is the provided SQL accepted when using another way to talk to Oracle?
>
>4. Have you considered putting your Ruby code in a script, which would give
>you more control over what happens and how errors are reported?
>
>  
>

--------------060601080200060400080905--