kubo / ruby-oci8

Ruby-oci8 - Oracle interface for ruby
Other
169 stars 75 forks source link

OCIError: OCI Library Initialization Error #137

Closed garct closed 8 years ago

garct commented 8 years ago

Hello, I was hoping to find some help with the issue below. I am using: Windows 10 Ruby 2.2.4 Oracle 12c full client (32 and 64 bit)

I took a look at this post #78 but I am not getting the nls lang not set error identified in that post.

I have tried copying OCI.dll and oraocci12.dll into C:\Ruby22\bin but experienced the same issue.

` irb(main):001:0> require'oci8'

OCIError: OCI Library Initialization Error - C:\Program Files (x86)\Oracle\Client\12c\12.1.0.2.0x86_1\Client\bin\OCI.DLL
    from oci8lib.c:156:in oci8lib_220.so
    from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from C:/Ruby22/lib/ruby/gems/2.2.0/gems/ruby-oci8-2.2.2-x86-mingw32/lib/oci8.rb:72:in `<top (required)>'
    from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
    from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
    from C:/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'
    from (irb):1
    from C:/Ruby22/bin/irb:11:in `<main>'`
kubo commented 8 years ago

Could you post the output of the following command?

dir "C:\Program Files (x86)\Oracle\Client\12c\12.1.0.2.0x86_1\Client\bin"
kubo commented 8 years ago

Could you run sqlplus in C:\Program Files (x86)\Oracle\Client\12c\12.1.0.2.0x86_1\Client\bin?

Oracle 12c full client (32 and 64 bit) ... I have tried copying OCI.dll and oraocci12.dll into C:\Ruby22\bin but experienced the same issue.

OCI.dll must be in %ORACLE_HOME%\bin when it is full client. (ORACLE_HOME is set in the Windows registry.)

garct commented 8 years ago

I was not able to run sqlplus at: C:\Program Files (x86)\Oracle\Client\12c\12.1.0.2.0x86_1\Client\bin

C:\Program Files (x86)\Oracle\Client\12c\12.1.0.2.0x86_1\Client\BIN>sqlplus Error 6 initializing SQL*Plus SP2-0667: Message file sp1<lang>.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory

However, I did successfully run sqlplus in C:\Program Files\Oracle\Client\12c\12.1.0.x64_1\Client\bin which also seems to be what is set at ORACLE_HOME. Is this my problem?

garct commented 8 years ago

Contents of C:\Program Files (x86)\Oracle\Client\12c\12.1.0.2.0x86\Client\bin

` Directory of C:\Program Files (x86)\Oracle\Client\12c\12.1.0.2.0x86_1\Client\bin

09/08/2016 04:02 PM

. 09/08/2016 04:02 PM .. 09/15/2014 10:08 PM 20,480 adrci.exe 01/13/2014 02:52 AM 201,216 ccme_asym.dll 01/13/2014 02:52 AM 317,952 ccme_base.dll 06/05/2014 04:04 AM 151,552 ccme_base_non_fips.dll 01/13/2014 02:52 AM 521,728 ccme_ecc.dll 01/13/2014 02:52 AM 808,448 ccme_ecc_accel_fips.dll 06/05/2014 04:04 AM 777,728 ccme_ecc_accel_non_fips.dll 06/05/2014 04:04 AM 280,576 ccme_ecc_non_fips.dll 08/07/2014 05:13 PM 42,496 corejava.dll 01/13/2014 02:52 AM 233,984 cryptocme.dll 04/10/2014 11:40 AM 2,638 cryptocme.sig 08/12/2014 02:28 AM 155,648 elements.exe 09/08/2016 04:01 PM 679 eusm.bat 09/15/2014 10:08 PM 44,544 extjob.exe 09/15/2014 10:08 PM 44,544 extjobo.exe 09/15/2014 09:36 PM 66,560 genezi.exe 09/10/2014 02:09 PM 28,160 getcrshome.exe 09/13/2014 12:44 PM 10,240 heteroxa12.dll 09/13/2014 12:44 PM 4,457 heteroxa12.sym 09/15/2014 10:07 PM 55,808 kfed.exe 09/15/2014 10:08 PM 94,720 kfod.exe 05/07/2014 11:56 PM 46,448 launch.exe 09/08/2016 04:01 PM 1,216 lbuilder.bat 08/10/2014 02:01 PM 88,064 LCSSCAN.EXE 08/12/2014 02:28 AM 151,552 libexpat.dll 08/12/2014 02:28 AM 9,942 libexpat.exp 08/12/2014 02:28 AM 17,238 libexpat.lib 08/12/2014 02:28 AM 231,896 libexpatMT.lib 08/12/2014 02:28 AM 151,552 libexpatw.dll 08/12/2014 02:28 AM 9,945 libexpatw.exp 08/12/2014 02:28 AM 17,320 libexpatw.lib 08/12/2014 02:28 AM 248,304 libexpatwMT.lib 08/10/2014 02:00 PM 33,792 lmsgen.exe 09/15/2014 10:05 PM 33,280 loadpsp.exe 09/10/2014 02:09 PM 43,520 lsnodes.exe 08/10/2014 02:00 PM 45,568 lxegen.exe 08/10/2014 02:00 PM 298,496 lxinst.exe 09/28/2013 08:51 AM 3,698 mkstore 04/07/2014 03:35 PM 1,938 mkstore.bat 04/12/2013 12:46 AM 1,675 modifyEMService.pl 03/08/2014 04:56 AM 348,160 msvcr71.dll 09/08/2016 04:01 PM 2,755 netca.bat 09/08/2016 04:01 PM 3,200 netca.cl 09/08/2016 04:01 PM 168 netca_deinst.bat 09/15/2014 09:28 PM 1,015,808 oci.dll 09/13/2014 12:46 PM 101,376 ocijdbc12.dll 09/13/2014 12:46 PM 16,955 ocijdbc12.sym 09/15/2014 09:11 PM 345,088 ociw32.dll 09/08/2016 04:01 PM 1,047 oerr.bat 11/10/2011 01:53 PM 5,114 oerr.pl 08/12/2014 05:08 PM 178,688 onsclient.dll 09/08/2016 04:02 PM 156 onsctl.bat 09/10/2014 02:10 PM 22,016 oraagfw12.dll 09/15/2014 10:07 PM 947,200 oraasmclnt12.dll 09/16/2014 01:19 AM 17,920 orabase.exe 09/15/2014 10:09 PM 447,488 oracell12.dll 09/08/2016 04:01 PM 44 oracle.key 08/10/2014 02:27 PM 16,896 OracleAdNetConnect.exe 08/10/2014 02:27 PM 14,848 OracleAdNetConnectRCD.dll 08/10/2014 02:27 PM 14,848 OracleAdNetConnectRCE.dll 08/10/2014 02:27 PM 14,848 OracleAdNetConnectRCF.dll 08/10/2014 02:27 PM 14,848 OracleAdNetConnectRCI.dll 08/10/2014 02:27 PM 14,848 OracleAdNetConnectRCJA.dll 08/10/2014 02:27 PM 14,848 OracleAdNetConnectRCKO.dll 08/10/2014 02:27 PM 14,848 OracleAdNetConnectRCPTB.dll 08/10/2014 02:27 PM 14,848 OracleAdNetConnectRCUS.dll 08/10/2014 02:27 PM 14,848 OracleAdNetConnectRCZHS.dll 08/10/2014 02:27 PM 24,576 OracleAdNetTest.exe 08/10/2014 02:27 PM 15,360 OracleAdNetTestRCD.dll 08/10/2014 02:27 PM 15,360 OracleAdNetTestRCE.dll 08/10/2014 02:27 PM 15,360 OracleAdNetTestRCF.dll 08/10/2014 02:27 PM 15,360 OracleAdNetTestRCI.dll 08/10/2014 02:27 PM 15,360 OracleAdNetTestRCJA.dll 08/10/2014 02:27 PM 15,360 OracleAdNetTestRCKO.dll 08/10/2014 02:27 PM 15,360 OracleAdNetTestRCPTB.dll 08/10/2014 02:27 PM 15,360 OracleAdNetTestRCUS.dll 08/10/2014 02:27 PM 15,360 OracleAdNetTestRCZHS.dll 09/15/2014 09:43 PM 4,878,848 oraclient12.dll 09/10/2014 02:06 PM 192,512 oraclsce12.dll 09/10/2014 02:06 PM 238,080 oraclsra12.dll 09/15/2014 09:42 PM 6,286,848 oracommon12.dll 08/07/2014 05:12 PM 1,473,536 oracore12.dll 09/10/2014 02:06 PM 151,552 oradbcfg12.dll 09/10/2014 02:05 PM 77,312 oraeons.dll 09/15/2014 09:44 PM 17,188,864 orageneric12.dll 09/10/2014 02:09 PM 578,560 oragns12.dll 09/10/2014 02:10 PM 80,384 oragnsjni12.dll 09/10/2014 02:06 PM 8,040,448 orahasgen12.dll 09/08/2016 04:01 PM 1,239 orahomeuserctl.bat 09/15/2014 09:39 PM 101,376 oraimr12.dll 08/04/2014 01:18 PM 1,196,544 oraipc1.dll 12/04/2002 08:40 PM 144 orajaxb.bat 08/11/2014 02:43 AM 19,456 orajmisc.dll 08/11/2014 03:24 AM 4,602,368 oraldapclnt12.dll 08/11/2014 03:24 AM 501,248 oraldapjclnt12.dll 08/10/2014 02:00 PM 71,168 oralxled.dll 08/04/2014 01:18 PM 1,264,128 oramql1.dll 08/09/2014 12:22 AM 42,496 oramtsctl.exe 08/09/2014 12:21 AM 19,456 oramts_deinst.exe 09/15/2014 08:58 PM 58,880 oramysql12.dll 08/10/2014 02:23 PM 4,021,248 oran12.dll 08/10/2014 02:23 PM 51,712 oranad12.dll 08/10/2014 02:23 PM 95,744 oranbeq12.dll 08/10/2014 02:22 PM 7,168 orancds12.dll 08/10/2014 02:23 PM 104,960 orancrypt12.dll 08/10/2014 02:23 PM 104,960 orancrypt12_ee.dll.dbl 08/10/2014 02:23 PM 20,480 oranhost12.dll 08/10/2014 02:23 PM 81,408 oranipc12.dll 08/10/2014 02:22 PM 89,088 oranjni12.dll 08/10/2014 02:23 PM 513,024 oranl12.dll 08/10/2014 02:23 PM 268,288 oranldap12.dll 08/10/2014 02:23 PM 36,864 oranldapj12.dll 08/10/2014 01:59 PM 856,064 oranls12.dll 08/10/2014 02:23 PM 81,408 orannmp12.dll 08/11/2014 03:24 AM 22,528 orannzmcs12.dll 08/11/2014 03:24 AM 4,269,056 orannzsbb12.dll 08/10/2014 02:23 PM 306,176 oranro12.dll 08/10/2014 02:23 PM 137,728 oransgr12.dll 08/10/2014 02:23 PM 178,176 orantcp12.dll 08/10/2014 02:23 PM 199,168 orantcps12.dll 08/10/2014 02:23 PM 39,936 orantns12.dll 09/15/2014 08:28 PM 645,632 oraocci12.dll 09/10/2014 02:05 PM 950,784 oraocr12.dll 09/10/2014 02:05 PM 694,784 oraocrb12.dll 09/10/2014 02:05 PM 63,488 oraocrutl12.dll 08/09/2014 12:18 AM 592,384 OraOLEDB12.dll 08/09/2014 12:16 AM 1,712 OraOLEDB12.tlb 08/09/2014 12:10 AM 9,728 OraOLEDB12d.dll 08/09/2014 12:10 AM 9,728 OraOLEDB12e.dll 08/09/2014 12:10 AM 9,728 OraOLEDB12f.dll 08/09/2014 12:10 AM 9,728 OraOLEDB12i.dll 08/09/2014 12:11 AM 9,216 OraOLEDB12ja.dll 08/09/2014 12:09 AM 9,216 OraOLEDB12ko.dll 08/09/2014 12:09 AM 9,728 OraOLEDB12ptb.dll 08/09/2014 12:16 AM 9,728 OraOLEDB12us.dll 08/09/2014 12:10 AM 9,216 OraOLEDB12zhs.dll 08/09/2014 12:10 AM 9,216 OraOLEDB12zht.dll 08/09/2014 12:16 AM 126,464 OraOLEDBgmr12.dll 08/09/2014 12:16 AM 15,360 OraOLEDBpus12.dll 08/09/2014 12:10 AM 9,728 OraOLEDBrfc12.dll 08/09/2014 12:10 AM 9,216 OraOLEDBrmc12.dll 08/09/2014 12:15 AM 143,872 OraOLEDBrst12.dll 08/09/2014 12:10 AM 17,408 OraOLEDButl12.dll 08/12/2014 05:08 PM 178,688 oraons.dll 08/12/2014 05:08 PM 14,848 oraonsx.dll 09/10/2014 02:11 PM 100,352 oraoobjlib.dll 08/08/2014 11:54 PM 343,040 OraOps12.dll 09/28/2013 08:51 AM 4,004 orapki 09/28/2013 08:51 AM 2,301 orapki.bat 09/15/2014 09:41 PM 99,840 oraplc12.dll 09/15/2014 09:41 PM 4,121,600 oraplp12.dll 09/15/2014 09:41 PM 5,632,000 orapls12.dll 09/10/2014 02:09 PM 50,176 orardjni12.dll 09/15/2014 08:04 PM 10,752 oraskjcx12.dll 08/17/2014 04:29 AM 29,184 ORASLAX12.DLL 08/10/2014 02:00 PM 199,680 orasnls12.dll 09/15/2014 09:26 PM 728,576 orasql12.dll 09/15/2014 09:26 PM 12,288 orasql8.dll 09/10/2014 02:11 PM 328,704 orasrvm12.dll 09/10/2014 02:11 PM 18,944 orasrvmcred12.dll 09/10/2014 02:11 PM 756,224 orasrvmhas12.dll 09/10/2014 02:11 PM 116,736 orasrvmocr12.dll 09/10/2014 02:05 PM 92,160 orauini12.dll 08/10/2014 01:59 PM 92,160 oraunls12.dll 08/07/2014 05:12 PM 9,216 orauts.dll 08/07/2014 05:12 PM 1,149 orauts.sym 09/15/2014 06:02 PM 9,728 oravsn12.dll 09/15/2014 06:01 PM 9,728 oravsn12_cee.dll.dbl 09/15/2014 05:59 PM 9,728 oravsn12_cse.dll.dbl 09/15/2014 06:02 PM 9,728 oravsn12_ee.dll.dbl 09/15/2014 06:00 PM 9,728 oravsn12_pe.dll.dbl 09/15/2014 05:58 PM 9,728 oravsn12_std.dll.dbl 09/15/2014 09:11 PM 46,080 oravssmsg.dll 09/15/2014 09:11 PM 46,080 oravssmsgUS.dll 09/15/2014 09:12 PM 168,448 oravssw.exe 09/15/2014 09:15 PM 208,896 orawsec12.dll 09/15/2014 03:16 PM 5,120 orawsecmsgus.dll 02/26/2001 04:04 PM 148 oraxml.bat 08/10/2014 01:44 PM 5,612,544 oraxml12.dll 02/26/2001 04:04 PM 148 oraxsl.bat 08/11/2014 03:24 AM 4,674,048 orazt12.dll 08/11/2014 03:24 AM 4,674,560 oraztkg12.dll 03/05/2008 08:58 AM 2,478 orclcontainer.bmp 03/05/2008 08:59 AM 2,478 orclcontext.bmp 03/05/2008 09:00 AM 246 orcldbserver.bmp 03/05/2008 09:02 AM 3,310 orclnetservice.bmp 09/15/2014 10:09 PM 137,216 orion.exe 09/15/2014 03:08 PM 336 ott.bat 08/12/2014 02:28 AM 65,536 outline.exe 09/28/2013 08:51 AM 5,514 owm 09/08/2016 04:01 PM 2,329 owm.cl 08/11/2014 03:26 AM 4,066,304 owm2.dll 09/15/2014 09:26 PM 1,850,880 proc.exe 09/08/2016 04:01 PM 2,638 rconfig.bat 09/08/2016 04:01 PM 213 registerDll.bat 10/04/2011 12:55 PM 135 registerDll.bat.sbs 09/10/2014 02:17 PM 143,360 RemoteExecService.exe 08/10/2014 01:54 PM 22,528 schema.exe 09/10/2014 02:21 PM 10,752 sclsspawn.exe 09/08/2016 04:02 PM 1,279 selecthome.bat 09/08/2016 04:02 PM 1,194 selecthome.bat.odpnet 09/08/2016 04:02 PM 85 selecthome.bat.oraoledb 08/12/2014 01:19 PM 679,424 sqlplus.exe 08/12/2014 01:20 PM 86,688 sqlplus.sym 09/15/2014 09:16 PM 568,832 sqora32.dll 09/15/2014 09:16 PM 126,464 sqoras32.dll 09/15/2014 09:16 PM 17,408 sqresja.dll 09/15/2014 09:16 PM 18,944 sqresus.dll 09/08/2016 04:01 PM 4,394 srvctl.bat 08/10/2014 02:26 PM 33,280 tnsping.exe 09/08/2016 04:01 PM 377 trcasst.bat 09/15/2014 10:08 PM 20,480 uidrvci.exe 09/08/2016 04:01 PM 974 umu.bat 12/28/2009 01:21 AM 192,512 unzip.exe 09/15/2014 10:08 PM 362,496 wrc.exe 08/10/2014 01:54 PM 108,544 xml.exe 08/12/2014 02:28 AM 86,016 xmlwf.exe 12/28/2009 01:21 AM 259,072 zip.exe 218 File(s) 108,304,602 bytes 2 Dir(s) 114,421,911,552 bytes free`

kubo commented 8 years ago

There are three ways.

garct commented 8 years ago

Installing x64 ruby seems to have solved the problem.

Thanks !!