Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Oracle-oci8.2.0

Reply
Thread Tools

Oracle-oci8.2.0

 
 
Vetrivel Vetrivel
Guest
Posts: n/a
 
      11-30-2009

Problem in oci8.2.0.1.gem
I installed oci8 using gem1.8 command .

Then i required that file using oci8.But I got the error .
require 'oci8'


LoadError:
/usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.7-x86-mswin32-60/ext/oci8/oci8lib.so:
invalid ELF header -
/usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.7-x86-mswin32-60/ext/oci8/oci8lib.so
from
/usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.7-x86-mswin32-60/ext/oci8/oci8lib.so
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from
/usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.7-x86-mswin32-60/lib/oci8.rb:20
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):3
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Luis Lavena
Guest
Posts: n/a
 
      11-30-2009
On Nov 30, 8:08*am, Vetrivel Vetrivel <(E-Mail Removed)>
wrote:
> Problem in oci8.2.0.1.gem
> * * * * I installed oci8 using gem1.8 command .
>
> Then i required that file using oci8.But I got the error .
> *require 'oci8'
>
> LoadError:
> /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.7-x86-mswin32-60/ext/oci8/oci8lib .so:
> invalid ELF header -
> /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.7-x86-mswin32-60/ext/oci8/oci8lib .so
> * * * * from
> /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.7-x86-mswin32-60/ext/oci8/oci8lib .so
> * * * * from
> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
> * * * * from
> /usr/lib/ruby/gems/1.8/gems/ruby-oci8-1.0.7-x86-mswin32-60/lib/oci8.rb:20
> * * * * from
> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in
> `gem_original_require'
> * * * * from
> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
> * * * * from (irb):3
> --


You installed a Windows binary gem on a Linux operating system:

"x86-mswin32-60" is the platform of the gem.

Please check the project page of the gem and look for build
instructions for Linux.

http://ruby-oci8.rubyforge.org/en/

--
Luis Lavena
 
Reply With Quote
 
 
 
 
Vetrivel Vetrivel
Guest
Posts: n/a
 
      11-30-2009
Luis Lavena wrote:
> On Nov 30, 8:08�am, Vetrivel Vetrivel <(E-Mail Removed)>
> wrote:
>> � � � � from
>> � � � � from (irb):3
>> --

>
> You installed a Windows binary gem on a Linux operating system:
>
> "x86-mswin32-60" is the platform of the gem.
>
> Please check the project page of the gem and look for build
> instructions for Linux.
>
> http://ruby-oci8.rubyforge.org/en/




Thanks for your reply. But I have installed

gem1.8 install ruby-oci8-1.0.6.gem
Successfully installed ruby-oci8-1.0.6
1 gem installed
Installing ri documentation for ruby-oci8-1.0.6...
Installing RDoc documentation for ruby-oci8-1.0.6...

require 'oci8' . I got following errors .

LoadError: /usr/local/lib/site_ruby/1.8/i486-linux/oci8lib.so: invalid
ELF header - /usr/local/lib/site_ruby/1.8/i486-linux/oci8lib.so
from /usr/local/lib/site_ruby/1.8/i486-linux/oci8lib.so
from
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/lib/site_ruby/1.8/oci8.rb:20
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
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
Luis Lavena
Guest
Posts: n/a
 
      11-30-2009
On Nov 30, 10:43*am, Vetrivel Vetrivel <(E-Mail Removed)>
wrote:
> Luis Lavena wrote:
> > On Nov 30, 8:08 am, Vetrivel Vetrivel <(E-Mail Removed)>
> > wrote:
> >> from
> >> from (irb):3
> >> --

>
> > You installed a Windows binary gem on a Linux operating system:

>
> > "x86-mswin32-60" is the platform of the gem.

>
> > Please check the project page of the gem and look for build
> > instructions for Linux.

>
> >http://ruby-oci8.rubyforge.org/en/

>
> Thanks for your reply. But I have installed
>
> gem1.8 install ruby-oci8-1.0.6.gem
> Successfully installed ruby-oci8-1.0.6
> 1 gem installed
> Installing ri documentation for ruby-oci8-1.0.6...
> Installing RDoc documentation for ruby-oci8-1.0.6...
>
> require 'oci8' . I got following errors .
>
> LoadError: /usr/local/lib/site_ruby/1.8/i486-linux/oci8lib.so: invalid
> ELF header - /usr/local/lib/site_ruby/1.8/i486-linux/oci8lib.so
> * * * * from /usr/local/lib/site_ruby/1.8/i486-linux/oci8lib.so
> * * * * from
> /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
> * * * * from /usr/local/lib/site_ruby/1.8/oci8.rb:20
> * * * * 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.

--
Luis Lavena
 
Reply With Quote
 
Vetrivel Vetrivel
Guest
Posts: n/a
 
      12-01-2009
Luis Lavena wrote:
> On Nov 30, 10:43�am, Vetrivel Vetrivel <(E-Mail Removed)>
> 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:BD.const_get(:OCI
dbd_dr:river.new
DBI.connect('dbi:OCI8:database_name:20.1.65.132:15 21', 'username',
'password')

But I got following error

env.c:257:in oci8lib.so: ORA-12154: TNS:could not resolve the connect
identifier specified (DBI:atabaseError)
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",'//ipaddressort',: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/.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments