Luis Lavena wrote: > On Nov 30, 10:43am, Vetrivel Vetrivel <vetrivel.bk... / gmail.com> > wrote: >> >> Installing ri documentation for ruby-oci8-1.0.6... >> from >> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in >> `gem_original_require' >> from >> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' >> from (irb):2 > > Somehow you have a oci8lib.so inside your site_ruby, which indicates > something got installed as extension inside your Ruby installation and > not as a gem. > > Please check back any previous attempt of installation of OCI8 you > tried in your system, or check your Linux distribution for a package > OCI for Ruby, which could be interfering. > > Without more information about your environment, how you reached that > point, what distro of linux, how you installed Ruby and so on, we > can't help you. > > Help us help you. Thanks for your help , I have written a simple program to connect with oracle . But I faced the below error . In this program i have mentioned the gem path . So I am saying that , it is taking from the /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.5/lib path . The program $LOAD_PATH.unshift("/usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.5/lib/") require 'oci8' $LOAD_PATH.unshift("/usr/lib/ruby/gems/1.8/gems/dbi-0.4.1/lib/") require 'dbi' ; dbd_dr = DBI::DBD.const_get(:OCI8) dbd_dr::Driver.new DBI.connect('dbi:OCI8:database_name:20.1.65.132:1521', 'username', 'password') But I got following error env.c:257:in oci8lib.so: ORA-12154: TNS:could not resolve the connect identifier specified (DBI::DatabaseError) from /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.5/lib/oci8.rb:229:in `initialize' from /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.5/lib/dbd/OCI8.rb:182:in `new' from /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.5/lib/dbd/OCI8.rb:182:in `connect' from /usr/lib/ruby/gems/1.8/gems/dbi-0.4.1/lib/dbi/handles/driver.rb:33:in `connect' from /usr/lib/ruby/gems/1.8/gems/dbi-0.4.1/lib/dbi.rb:143:in `connect' from test.rb:13 Then I tried like this OCI8.new("username","password",'//ipaddress:port',:SYSDBA) ; But I got below error server.c:48:in oci8lib.so: ORA-12504: TNS:listener was not given the SERVICE_NAME in CONNECT_DATA (OCIError) from /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.5/lib/oci8.rb:219:in `initialize' from /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.5/lib/oci8.rb:142:in `do_ocicall' from /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.5/lib/oci8.rb:219:in `initialize' from test.rb:14:in `new' from test.rb:14 I am using ruby1.8 -- Posted via http://www.ruby-forum.com/.