Oci8+rubyscript2exe -> TNS-12538

Hi all!

I tried to pack to an exe a ruby script, which uses oci8.
On my machine it works fine, but when I run it on an other machine I
get the following error:
(I also dumped the files packed by rubyscript2exe)
Can somebody hint what could be the problem?
Do I need any other file to run the program in any other machine?

Any type of hints is welcome

Thanks
Gergo


Fatal NI connect error 12538, connecting to:
(DESCRIPTION=(ADDRESS=(COMMUNITY=tcp.world)(PROTOCOL=TCP)(Host=ADONIS)
(Port=1521))(CONNECT_DATA=(SID=PPRO2003)(CID=(PROGRAM=C:
\DOCUME~1\bkozma\eee\eee.heti_jelentes.exe.2\bin\ruby.exe)(HOST=POLLUX)
(USER=bkozma))))

VERSION INFORMATION:
TNS for 32-bit Windows: Version 9.2.0.1.0 - Production
Time: 11-JAN-2008 10:37:11
Tracing not turned on.
Tns error struct:
nr err code: 0
ns main err code: 12538
TNS-12538: TNS:no such protocol adapter
ns secondary err code: 12560
nt main err code: 508
TNS-00508: No such protocol adapter
nt secondary err code: 0
nt OS err code: 0

Here comes files packed in the exe:

d bin
f bin\digest.so (24663)
f bin\etc.so (20561)
f bin\fcntl.so (20565)
f bin\iconv.dll (892928)
f bin\iconv.so (24661)
f bin\LIBEAY32.dll (1077248)
f bin\msvcrt-ruby18.dll (872518)
f bin\OCI.DLL (114688)
f bin\oci8lib.so (61509)
f bin\openssl.so (180313)
f bin\OraClient9.Dll (1536272)
f bin\OraCommon9.Dll (590096)
f bin\ORACORE9.DLL (647440)
f bin\OraGeneric9.Dll (2445584)
f bin\oraldapclnt9.dll (147728)
f bin\oran9.dll (733456)
f bin\orancds9.dll (24848)
f bin\orancrypt9.dll (94480)
f bin\oranhost9.dll (24848)
f bin\oranl9.dll (180496)
f bin\oranldap9.dll (69904)
f bin\oranls9.dll (491792)
f bin\oranms.dll (28944)
f bin\oranmsp.dll (65808)
f bin\orannts9.dll (53520)
f bin\orannzsbb9.dll (561424)
f bin\oranoname9.dll (24848)
f bin\oranro9.dll (221456)
f bin\orantns9.dll (28944)
f bin\OraPls9.Dll (3223824)
f bin\oraslax9.dll (28944)
f bin\orasnls9.dll (65808)
f bin\orasql9.dll (475408)
f bin\ORATRACE9.dll (246032)
f bin\oraunls9.dll (69904)
f bin\oravsn9.dll (24848)
f bin\orawtc9.dll (24848)
f bin\oraxml9.dll (512272)
f bin\oraxsd9.dll (127248)
f bin\ruby.exe (20541)
f bin\rubyw.exe (20542)
f bin\sha2.so (24666)
f bin\socket.so (45143)
f bin\SSLEAY32.dll (200704)
f bin\stringio.so (28763)
f bin\syck.so (122963)
f bin\thread.so (24663)
f bin\Win32API.so (20571)
f bin\zlib.so (45056)
f bin\zlib1.dll (59904)
d lib
d lib\date
f lib\date\format.rb (26717)
f lib\date.rb (52154)
f lib\delegate.rb (8739)
d lib\digest
f lib\digest\sha2.rb (1475)
f lib\digest\sha2.so (24666)
f lib\digest.rb (1145)
f lib\digest.so (24663)
f lib\etc.so (20561)
d lib\ev
f lib\ev\ftools.rb (4338)
f lib\fcntl.so (20565)
f lib\fileutils.rb (43014)
f lib\forwardable.rb (6310)
f lib\ftools.rb (6316)
f lib\iconv.so (24661)
f lib\jcode.rb (4400)
d lib\net
f lib\net\http.rb (65629)
f lib\net\protocol.rb (7810)
f lib\oci8.rb (42853)
f lib\oci8lib.so (61509)
d lib\openssl
f lib\openssl\bn.rb (637)
f lib\openssl\buffering.rb (3791)
f lib\openssl\cipher.rb (1333)
f lib\openssl\digest.rb (1197)
f lib\openssl\ssl.rb (3102)
f lib\openssl\x509.rb (4444)
f lib\openssl.rb (508)
f lib\openssl.so (180313)
f lib\parsedate.rb (1359)
f lib\rational.rb (11847)
d lib\rbconfig
f lib\rbconfig\datadir.rb (637)
f lib\rbconfig.rb (6060)
d lib\rubygems
f lib\rubygems\custom_require.rb (3585)
d lib\rubygems\digest
f lib\rubygems\digest\sha2.rb (356)
f lib\rubygems\gem_openssl.rb (1102)
f lib\rubygems\remote_fetcher.rb (4030)
f lib\rubygems\rubygems_version.rb (133)
f lib\rubygems\security.rb (16910)
f lib\rubygems\source_index.rb (10922)
f lib\rubygems\specification.rb (21814)
f lib\rubygems\user_interaction.rb (6354)
f lib\rubygems\version.rb (8202)
f lib\rubygems.rb (15196)
d lib\rubyscript2exe.gems
d lib\rubyscript2exe.gems\gems
d lib\rubyscript2exe.gems\specifications
f lib\rubyscript2exe.rb (2210)
f lib\socket.so (45143)
f lib\stringio.so (28763)
f lib\syck.so (122963)
f lib\tempfile.rb (4431)
f lib\thread.rb (104)
f lib\thread.so (24663)
f lib\time.rb (32241)
f lib\timeout.rb (2298)
f lib\tmpdir.rb (1041)
f lib\ubygems.rb (268)
d lib\uri
f lib\uri\common.rb (17567)
f lib\uri\ftp.rb (3453)
f lib\uri\generic.rb (24153)
f lib\uri\http.rb (2650)
f lib\uri\https.rb (498)
f lib\uri\ldap.rb (3342)
f lib\uri\mailto.rb (6684)
f lib\uri.rb (694)
f lib\Win32API.so (20571)
d lib\yaml
f lib\yaml\basenode.rb (6129)
f lib\yaml\constants.rb (1186)
f lib\yaml\error.rb (1069)
f lib\yaml\rubytypes.rb (13080)
f lib\yaml\stream.rb (700)
f lib\yaml\syck.rb (271)
f lib\yaml\tag.rb (3156)
f lib\yaml\types.rb (5114)
f lib\yaml\ypath.rb (1328)
f lib\yaml.rb (12525)
f lib\zlib.so (45056)
f bootstrap.rb (2642)
f empty.rb (0)
d app
f app\heti_jelentes.rb (7960)
i eee.info
c %tempdir%\bin\ruby.exe -r %tempdir%\bootstrap.rb -T1 %tempdir%
\empty.rb %tempdir%\app\heti_jelentes.rb

Hi,

On Jan 11, 2008 10:09 PM, pihentagy [email protected] wrote:

Hi all!

I tried to pack to an exe a ruby script, which uses oci8.
On my machine it works fine, but when I run it on an other machine I
get the following error:
(I also dumped the files packed by rubyscript2exe)
Can somebody hint what could be the problem?
Do I need any other file to run the program in any other machine?
(snip)
f bin\OraClient9.Dll (1536272)
f bin\OraCommon9.Dll (590096)
f bin\ORACORE9.DLL (647440)

It looks like using Oracle full client. Don’t copy Oracle full client
libraries.
They need to be in the installed location. Otherwise, they won’t work.

IMO, it is a case to use Oracle instant client.

Hi!

Thanks for the answer!

Unfortunately using the instant client causes another error, namely:

D:\temp>D:\temp\heti_jelentes_uj.exe
Starting up
C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/oci8.rb:51:in
init': OCI Library Initialization Error (OCIError) from C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/ oci8.rb:51 from C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/ rubygems/custom_require.rb:27:ingem_original_require’
from C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/
rubygems/custom_require.rb:27:in require' from C:\DOCUME~1\bkozma\eee\eee.heti_jelentes.exe.2\app \heti_jelentes.rb:2 from C:\DOCUME~1\bkozma\eee\eee.heti_jelentes.exe. 2\bootstrap.rb:77:inload’
from C:\DOCUME~1\bkozma\eee\eee.heti_jelentes.exe.
2\bootstrap.rb:77

Hi!

Thanks for the answer!

Unfortunately using the instant client causes another error, namely:

D:\temp>D:\temp\heti_jelentes_uj.exe
Starting up
C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/oci8.rb:51:in
init': OCI Library Initialization Error (OCIError) from C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/ oci8.rb:51 from C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/ rubygems/custom_require.rb:27:ingem_original_require’
from C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/
rubygems/custom_require.rb:27:in require' from C:\DOCUME~1\bkozma\eee\eee.heti_jelentes.exe.2\app \heti_jelentes.rb:2 from C:\DOCUME~1\bkozma\eee\eee.heti_jelentes.exe. 2\bootstrap.rb:77:inload’
from C:\DOCUME~1\bkozma\eee\eee.heti_jelentes.exe.
2\bootstrap.rb:77

Hi,

On Jan 15, 2008 1:34 AM, pihentagy [email protected] wrote:

Hi!

Thanks for the answer!

Unfortunately using the instant client causes another error, namely:

D:\temp>D:\temp\heti_jelentes_uj.exe
Starting up
C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/oci8.rb:51:in
`init’: OCI Library Initialization Error (OCIError)

OCI.DLL in instant client requires ORAOCIICUS10.DLL (basic lite)
or ORAOCIEI10.DLL(basic). Either of the two dlls needs to be in the
PATH or in the same directory where oci.dll is.

Sorry. I must be annoying… But another error comes:

D:\temp>heti_jelentes_legujabb.exe
C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/oci8lib.so: 126:
The specified module could not be found. - C:/DOCUME~1/bkozma/eee/
eee.heti_jelentes.exe.2/lib/oci8lib.so (LoadError)
from C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/
rubygems/custom_require.rb:27:in require' from C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/ oci8.rb:20 from C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/ rubygems/custom_require.rb:27:ingem_original_require’
from C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/
rubygems/custom_require.rb:27:in require' from C:\DOCUME~1\bkozma\eee\eee.heti_jelentes.exe.2\app \heti_jelentes.rb:2 from C:\DOCUME~1\bkozma\eee\eee.heti_jelentes.exe. 2\bootstrap.rb:77:inload’
from C:\DOCUME~1\bkozma\eee\eee.heti_jelentes.exe.
2\bootstrap.rb:77

File list was:
d bin
f bin\digest.so (24663)
f bin\etc.so (20561)
f bin\fcntl.so (20565)
f bin\iconv.dll (892928)
f bin\iconv.so (24661)
f bin\LIBEAY32.dll (1077248)
f bin\msvcrt-ruby18.dll (872518)
f bin\OCI.DLL (352256)
f bin\oci8lib.so (61509)
f bin\openssl.so (180313)
f bin\oraociicus10.dll (18194432)
f bin\ruby.exe (20541)
f bin\rubyw.exe (20542)
f bin\sha2.so (24666)
f bin\socket.so (45143)
f bin\SSLEAY32.dll (200704)
f bin\stringio.so (28763)
f bin\syck.so (122963)
f bin\thread.so (24663)
f bin\Win32API.so (20571)
f bin\zlib.so (45056)
f bin\zlib1.dll (59904)
d lib
d lib\date
f lib\date\format.rb (26717)
f lib\date.rb (52154)
f lib\delegate.rb (8739)
d lib\digest
f lib\digest\sha2.rb (1475)
f lib\digest\sha2.so (24666)
f lib\digest.rb (1145)
f lib\digest.so (24663)
f lib\etc.so (20561)
d lib\ev
f lib\ev\ftools.rb (4338)
f lib\fcntl.so (20565)
f lib\fileutils.rb (43014)
f lib\forwardable.rb (6310)
f lib\ftools.rb (6316)
f lib\iconv.so (24661)
f lib\jcode.rb (4400)
d lib\net
f lib\net\http.rb (65629)
f lib\net\protocol.rb (7810)
f lib\oci8.rb (42853)
f lib\oci8lib.so (61509)
d lib\openssl
f lib\openssl\bn.rb (637)
f lib\openssl\buffering.rb (3791)
f lib\openssl\cipher.rb (1333)
f lib\openssl\digest.rb (1197)
f lib\openssl\ssl.rb (3102)
f lib\openssl\x509.rb (4444)
f lib\openssl.rb (508)
f lib\openssl.so (180313)
f lib\parsedate.rb (1359)
f lib\rational.rb (11847)
d lib\rbconfig
f lib\rbconfig\datadir.rb (637)
f lib\rbconfig.rb (6060)
d lib\rubygems
f lib\rubygems\custom_require.rb (3585)
d lib\rubygems\digest
f lib\rubygems\digest\sha2.rb (356)
f lib\rubygems\gem_openssl.rb (1102)
f lib\rubygems\remote_fetcher.rb (4030)
f lib\rubygems\rubygems_version.rb (133)
f lib\rubygems\security.rb (16910)
f lib\rubygems\source_index.rb (10922)
f lib\rubygems\specification.rb (21814)
f lib\rubygems\user_interaction.rb (6354)
f lib\rubygems\version.rb (8202)
f lib\rubygems.rb (15196)
d lib\rubyscript2exe.gems
d lib\rubyscript2exe.gems\gems
d lib\rubyscript2exe.gems\specifications
f lib\rubyscript2exe.rb (2210)
f lib\socket.so (45143)
f lib\stringio.so (28763)
f lib\syck.so (122963)
f lib\tempfile.rb (4431)
f lib\thread.rb (104)
f lib\thread.so (24663)
f lib\time.rb (32241)
f lib\timeout.rb (2298)
f lib\tmpdir.rb (1041)
f lib\ubygems.rb (268)
d lib\uri
f lib\uri\common.rb (17567)
f lib\uri\ftp.rb (3453)
f lib\uri\generic.rb (24153)
f lib\uri\http.rb (2650)
f lib\uri\https.rb (498)
f lib\uri\ldap.rb (3342)
f lib\uri\mailto.rb (6684)
f lib\uri.rb (694)
f lib\Win32API.so (20571)
d lib\yaml
f lib\yaml\basenode.rb (6129)
f lib\yaml\constants.rb (1186)
f lib\yaml\error.rb (1069)
f lib\yaml\rubytypes.rb (13080)
f lib\yaml\stream.rb (700)
f lib\yaml\syck.rb (271)
f lib\yaml\tag.rb (3156)
f lib\yaml\types.rb (5114)
f lib\yaml\ypath.rb (1328)
f lib\yaml.rb (12525)
f lib\zlib.so (45056)
f bootstrap.rb (2642)
f empty.rb (0)
d app
f app\heti_jelentes.rb (8015)
i eee.info
c %tempdir%\bin\ruby.exe -r %tempdir%\bootstrap.rb -T1 %tempdir%
\empty.rb %tempdir%\app\heti_jelentes.rb

Hi,

On Jan 16, 2008 1:15 AM, pihentagy [email protected] wrote:

Sorry. I must be annoying… But another error comes:

D:\temp>heti_jelentes_legujabb.exe
C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/oci8lib.so: 126:
The specified module could not be found. - C:/DOCUME~1/bkozma/eee/
eee.heti_jelentes.exe.2/lib/oci8lib.so (LoadError)

I have some questions.

What OS do you use?
oci.dll depends on msvcr71.dll and psapi.dll.
They may not be on old Windows OS.

Does instant client’s sqlplus run on the machine?

Can you run the following command on the machine?
ruby -I C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib -r
oci8lib -e “puts ‘OK’”

#unsubscribe

Hi!

Thanks, for the answer, makes my day :slight_smile: Now the error I get is not
related to OCI :slight_smile: So you solved the OCI part, which I was afraid of.

Hi!

Sorry for the delay. I have some urgent works…

D:\temp>heti_jelentes_legujabb.exe
C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib/oci8lib.so: 126:
The specified module could not be found. - C:/DOCUME~1/bkozma/eee/
eee.heti_jelentes.exe.2/lib/oci8lib.so (LoadError)

I have some questions.

What OS do you use?
oci.dll depends on msvcr71.dll and psapi.dll.
They may not be on old Windows OS.

Both the developer and the destination machine has Windows XP

Does instant client’s sqlplus run on the machine?
Err, haven’t tried it. On which machine btw?

Can you run the following command on the machine?
ruby -I C:/DOCUME~1/bkozma/eee/eee.heti_jelentes.exe.2/lib -r
oci8lib -e “puts ‘OK’”
On the dev machine, of course, prints ok. But the destination machine
does not have ruby installed of course.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs