ruby-oci8 2.2.10-x64-mingw-ucrt

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +14 -0
  3. data/COPYING +30 -0
  4. data/COPYING_old +64 -0
  5. data/ChangeLog +3826 -0
  6. data/Makefile +92 -0
  7. data/NEWS +1209 -0
  8. data/README.md +66 -0
  9. data/dist-files +112 -0
  10. data/docs/bind-array-to-in_cond.md +38 -0
  11. data/docs/conflicts-local-connections-and-processes.md +98 -0
  12. data/docs/hanging-after-inactivity.md +63 -0
  13. data/docs/install-binary-package.md +44 -0
  14. data/docs/install-full-client.md +111 -0
  15. data/docs/install-instant-client.md +194 -0
  16. data/docs/install-on-osx.md +46 -0
  17. data/docs/ldap-auth-and-function-interposition.md +123 -0
  18. data/docs/number-type-mapping.md +79 -0
  19. data/docs/platform-specific-issues.md +164 -0
  20. data/docs/report-installation-issue.md +50 -0
  21. data/docs/timeout-parameters.md +94 -0
  22. data/lib/.document +1 -0
  23. data/lib/dbd/OCI8.rb +591 -0
  24. data/lib/oci8/.document +8 -0
  25. data/lib/oci8/bindtype.rb +333 -0
  26. data/lib/oci8/check_load_error.rb +146 -0
  27. data/lib/oci8/compat.rb +117 -0
  28. data/lib/oci8/connection_pool.rb +179 -0
  29. data/lib/oci8/cursor.rb +605 -0
  30. data/lib/oci8/datetime.rb +605 -0
  31. data/lib/oci8/encoding-init.rb +45 -0
  32. data/lib/oci8/encoding.yml +537 -0
  33. data/lib/oci8/metadata.rb +2148 -0
  34. data/lib/oci8/object.rb +641 -0
  35. data/lib/oci8/oci8.rb +756 -0
  36. data/lib/oci8/ocihandle.rb +591 -0
  37. data/lib/oci8/oracle_version.rb +153 -0
  38. data/lib/oci8/properties.rb +196 -0
  39. data/lib/oci8/version.rb +3 -0
  40. data/lib/oci8.rb +190 -0
  41. data/lib/oci8lib_310.so +0 -0
  42. data/lib/ruby-oci8.rb +1 -0
  43. data/metaconfig +142 -0
  44. data/pre-distclean.rb +7 -0
  45. data/ruby-oci8.gemspec +85 -0
  46. data/setup.rb +1342 -0
  47. data/test/README.md +37 -0
  48. data/test/config.rb +201 -0
  49. data/test/setup_test_object.sql +199 -0
  50. data/test/setup_test_package.sql +59 -0
  51. data/test/test_all.rb +56 -0
  52. data/test/test_appinfo.rb +62 -0
  53. data/test/test_array_dml.rb +332 -0
  54. data/test/test_bind_array.rb +70 -0
  55. data/test/test_bind_boolean.rb +99 -0
  56. data/test/test_bind_integer.rb +47 -0
  57. data/test/test_bind_raw.rb +45 -0
  58. data/test/test_bind_string.rb +105 -0
  59. data/test/test_bind_time.rb +177 -0
  60. data/test/test_break.rb +125 -0
  61. data/test/test_clob.rb +85 -0
  62. data/test/test_connection_pool.rb +124 -0
  63. data/test/test_connstr.rb +220 -0
  64. data/test/test_datetime.rb +585 -0
  65. data/test/test_dbi.rb +365 -0
  66. data/test/test_dbi_clob.rb +53 -0
  67. data/test/test_encoding.rb +103 -0
  68. data/test/test_error.rb +87 -0
  69. data/test/test_metadata.rb +2674 -0
  70. data/test/test_object.rb +546 -0
  71. data/test/test_oci8.rb +624 -0
  72. data/test/test_oracle_version.rb +68 -0
  73. data/test/test_oradate.rb +255 -0
  74. data/test/test_oranumber.rb +792 -0
  75. data/test/test_package_type.rb +981 -0
  76. data/test/test_properties.rb +17 -0
  77. data/test/test_rowid.rb +32 -0
  78. metadata +123 -0
data/README.md ADDED
@@ -0,0 +1,66 @@
1
+ Ruby-oci8
2
+ =========
3
+
4
+ [![Gem Version](https://badge.fury.io/rb/ruby-oci8.svg)](http://badge.fury.io/rb/ruby-oci8)
5
+ [![Tests](https://github.com/kubo/ruby-oci8/actions/workflows/tests.yml/badge.svg)](https://github.com/kubo/ruby-oci8/actions/workflows/tests.yml)
6
+
7
+ What is ruby-oci8
8
+ -----------------
9
+
10
+ Ruby-oci8 is a ruby interface for Oracle Database. The latest version
11
+ is available for all Oracle versions after Oracle 10g including Oracle
12
+ Instant Client.
13
+
14
+ Use ruby-oci8 2.0.6 for Oracle 8 or use ruby-oci8 2.1.8 for Oracle 9i.
15
+
16
+ Note that ruby 1.8 support was dropped in ruby-oci8 2.2.0.
17
+ Use ruby-oci8 2.1.8 for ruby 1.8.
18
+
19
+ What's new
20
+ ----------
21
+
22
+ See {file:NEWS}.
23
+
24
+ Sample one-liner
25
+ ----------------
26
+
27
+ When you have an Oracle database server to which `sqlplus scott/tiger` can connect
28
+ and `scott` user has `emp` table, you can select `emp` and print rows
29
+ as CSV by the followig one liner.
30
+
31
+ ruby -r oci8 -e "OCI8.new('scott', 'tiger').exec('select * from emp') do |r| puts r.join(','); end"
32
+
33
+ Homepage
34
+ --------
35
+
36
+ * http://www.rubydoc.info/github/kubo/ruby-oci8
37
+
38
+ Installation
39
+ ------------
40
+
41
+ * {file:docs/install-full-client.md Install for Oracle Full Client}
42
+ * {file:docs/install-instant-client.md Install for Oracle Instant Client}
43
+ * {file:docs/install-binary-package.md Install Binary Package}
44
+ * {file:docs/install-on-osx.md Install on OS X}
45
+
46
+ Report issues
47
+ -------------
48
+
49
+ * {file:docs/report-installation-issue.md Report Installation Issues}
50
+ * [The issues page on github](https://github.com/kubo/ruby-oci8/issues)
51
+
52
+ Other documents
53
+ ---------------
54
+
55
+ * {file:docs/number-type-mapping.md Number Type Mapping between Oracle and Ruby}
56
+ * {file:docs/timeout-parameters.md Timeout Parameters}
57
+ * {file:docs/conflicts-local-connections-and-processes.md Conflicts between Local Connections and Child Process Handling on Unix}
58
+ * {file:docs/hanging-after-inactivity.md Hanging After a Long Period of Inactivity}
59
+ * {file:docs/bind-array-to-in_cond.md Bind an Array to IN-condition}
60
+ * {file:docs/ldap-auth-and-function-interposition.md LDAP Authentication and Function Interposition}
61
+
62
+ License
63
+ -------
64
+
65
+ * {file:COPYING 2-clause BSD-style license} from ruby-oci8 2.1.3
66
+ * {file:COPYING_old old Ruby license} until 2.1.2
data/dist-files ADDED
@@ -0,0 +1,112 @@
1
+ .yardopts
2
+ COPYING
3
+ COPYING_old
4
+ ChangeLog
5
+ Makefile
6
+ NEWS
7
+ README.md
8
+ dist-files
9
+ metaconfig
10
+ pre-distclean.rb
11
+ ruby-oci8.gemspec
12
+ setup.rb
13
+ docs/bind-array-to-in_cond.md
14
+ docs/conflicts-local-connections-and-processes.md
15
+ docs/hanging-after-inactivity.md
16
+ docs/install-binary-package.md
17
+ docs/install-full-client.md
18
+ docs/install-instant-client.md
19
+ docs/install-on-osx.md
20
+ docs/ldap-auth-and-function-interposition.md
21
+ docs/number-type-mapping.md
22
+ docs/platform-specific-issues.md
23
+ docs/report-installation-issue.md
24
+ docs/timeout-parameters.md
25
+ ext/oci8/.document
26
+ ext/oci8/MANIFEST
27
+ ext/oci8/apiwrap.c.tmpl
28
+ ext/oci8/apiwrap.h.tmpl
29
+ ext/oci8/apiwrap.rb
30
+ ext/oci8/apiwrap.yml
31
+ ext/oci8/attr.c
32
+ ext/oci8/bind.c
33
+ ext/oci8/connection_pool.c
34
+ ext/oci8/encoding.c
35
+ ext/oci8/env.c
36
+ ext/oci8/error.c
37
+ ext/oci8/extconf.rb
38
+ ext/oci8/hook_funcs.c
39
+ ext/oci8/lob.c
40
+ ext/oci8/metadata.c
41
+ ext/oci8/object.c
42
+ ext/oci8/oci8.c
43
+ ext/oci8/oci8.h
44
+ ext/oci8/oci8lib.c
45
+ ext/oci8/ocidatetime.c
46
+ ext/oci8/ocihandle.c
47
+ ext/oci8/ocinumber.c
48
+ ext/oci8/oraconf.rb
49
+ ext/oci8/oradate.c
50
+ ext/oci8/oranumber_util.c
51
+ ext/oci8/oranumber_util.h
52
+ ext/oci8/plthook.h
53
+ ext/oci8/plthook_elf.c
54
+ ext/oci8/plthook_osx.c
55
+ ext/oci8/plthook_win32.c
56
+ ext/oci8/post-config.rb
57
+ ext/oci8/stmt.c
58
+ ext/oci8/thread_util.c
59
+ ext/oci8/thread_util.h
60
+ ext/oci8/util.c
61
+ ext/oci8/win32.c
62
+ lib/.document
63
+ lib/oci8.rb
64
+ lib/dbd/OCI8.rb
65
+ lib/oci8/.document
66
+ lib/oci8/bindtype.rb
67
+ lib/oci8/check_load_error.rb
68
+ lib/oci8/compat.rb
69
+ lib/oci8/connection_pool.rb
70
+ lib/oci8/cursor.rb
71
+ lib/oci8/datetime.rb
72
+ lib/oci8/encoding-init.rb
73
+ lib/oci8/encoding.yml
74
+ lib/oci8/metadata.rb
75
+ lib/oci8/object.rb
76
+ lib/oci8/oci8.rb
77
+ lib/oci8/ocihandle.rb
78
+ lib/oci8/oracle_version.rb
79
+ lib/oci8/properties.rb
80
+ lib/oci8/version.rb
81
+ lib/ruby-oci8.rb
82
+ test/README.md
83
+ test/config.rb
84
+ test/setup_test_object.sql
85
+ test/setup_test_package.sql
86
+ test/test_all.rb
87
+ test/test_appinfo.rb
88
+ test/test_array_dml.rb
89
+ test/test_bind_array.rb
90
+ test/test_bind_boolean.rb
91
+ test/test_bind_raw.rb
92
+ test/test_bind_string.rb
93
+ test/test_bind_time.rb
94
+ test/test_bind_integer.rb
95
+ test/test_break.rb
96
+ test/test_clob.rb
97
+ test/test_connection_pool.rb
98
+ test/test_connstr.rb
99
+ test/test_encoding.rb
100
+ test/test_datetime.rb
101
+ test/test_dbi.rb
102
+ test/test_dbi_clob.rb
103
+ test/test_error.rb
104
+ test/test_metadata.rb
105
+ test/test_object.rb
106
+ test/test_oci8.rb
107
+ test/test_oracle_version.rb
108
+ test/test_oradate.rb
109
+ test/test_oranumber.rb
110
+ test/test_package_type.rb
111
+ test/test_properties.rb
112
+ test/test_rowid.rb
@@ -0,0 +1,38 @@
1
+ # @title Bind an Array to IN-condition
2
+
3
+ Bind an Array to IN-condition
4
+ =============================
5
+
6
+ Binding an arbitrary-length array to IN-condition is not simple.
7
+ You need to create an SQL statement containing a comma-separated
8
+ list whose length is same with the input data.
9
+
10
+ Example:
11
+
12
+ ids = [ ... ] # an arbitrary-length array containing user IDs.
13
+
14
+ place_holder_string = Array.new(ids.length) {|index| ":id_#{index}"}.join(', ')
15
+ # place_holder_string is:
16
+ # ":id_0" if ids.length == 1
17
+ # ":id_0, :id_1" if ids.length == 2
18
+ # ...
19
+ cursor = conn.parse("select * from users where id in (#{place_holder_string})")
20
+ ids.each_with_index do |id, index|
21
+ cursor.bind_param("id#{index}", id) # bind each element
22
+ end
23
+ cursor.exec()
24
+
25
+ However this is awkward. So {OCI8.in_cond} was added in ruby-oci8 2.2.2.
26
+ The above code is rewritten as follows:
27
+
28
+ ids = [ ... ] # an arbitrary-length array containing user IDs.
29
+
30
+ in_cond = OCI8::in_cond(:id, ids)
31
+ cursor = conn.exec("select * from users where id in (#{in_cond.names})", *in_cond.values)
32
+
33
+ or
34
+
35
+ ids = [ ... ] # an arbitrary-length array containing user IDs.
36
+
37
+ in_cond = OCI8::in_cond(:id, ids, Integer) # set the data type explicitly
38
+ cursor = conn.exec("select * from users where id in (#{in_cond.names})", *in_cond.values)
@@ -0,0 +1,98 @@
1
+ # @title Conflicts between Local Connections and Child Process Handling on Unix
2
+
3
+ Conflicts between Local Connections and Child Process Handling on Unix
4
+ ======================================================================
5
+
6
+ Background
7
+ ----------
8
+
9
+ When a local (not-TCP) Oracle connection is established on Unix,
10
+ Oracle client library changes signal handlers in the process to reap
11
+ all dead child processes. However it conflicts with child process
12
+ handling in ruby.
13
+
14
+ Problem 1: It trashes child process handling of Open3::popen.
15
+ ----------
16
+
17
+ require 'oci8'
18
+ require 'open3'
19
+
20
+ Open3::popen3('true') do |i, o, e, w|
21
+ p w.value
22
+ end
23
+
24
+ conn = OCI8.new(username, password)
25
+ puts "establish a local connection"
26
+
27
+ Open3::popen3('true') do |i, o, e, w|
28
+ p w.value
29
+ end
30
+
31
+ The above code outputs the following result:
32
+
33
+ #<Process::Status: pid 19236 exit 0>
34
+ establish a local connection
35
+ nil
36
+
37
+ `w.value` after a local connection doesn't work because Oracle reaps
38
+ the child process on the process termination before ruby detects it.
39
+
40
+ Problem 2: It creates defunct processes after disconnection if signal handlers are reset.
41
+ ----------
42
+
43
+ The `system` function overwrites signal handlers.
44
+ It fixes the problem 1 as follows.
45
+
46
+ require 'oci8'
47
+ require 'open3'
48
+
49
+ Open3::popen3('true') do |i, o, e, w|
50
+ p w.value
51
+ end
52
+
53
+ conn = OCI8.new(username, password) # Signal handlers are changed here.
54
+ puts "establish a local connection"
55
+ system('true') # Signal handlers are reset here.
56
+
57
+ Open3::popen3('true') do |i, o, e, w|
58
+ p w.value
59
+ end
60
+
61
+ The above code outputs the following result:
62
+
63
+ #<Process::Status: pid 19652 exit 0>
64
+ establish a local connection
65
+ #<Process::Status: pid 19656 exit 0>
66
+
67
+ `w.value` after a local connection works.
68
+
69
+ However it makes another problem.
70
+
71
+ require 'oci8'
72
+
73
+ conn = OCI8.new(username, password) # Signal handlers are changed here.
74
+ # An Oracle server process is created here.
75
+ puts "establish a local connection"
76
+ system('true') # Signal handlers are reset here.
77
+
78
+ conn.logoff # The Oracle server process exits and become defunct.
79
+
80
+ # ... do other stuffs...
81
+
82
+ If a program repeatedly creates a local connection and disconnects it,
83
+ the number of defunct processes increases gradually.
84
+
85
+ Solution: BEQUEATH_DETACH=YES
86
+ ----------
87
+
88
+ By setting [BEQUEATH_DETACH=YES][] in `sqlnet.ora`, Oracle client library
89
+ doesn't change signal handlers. The above two problems are fixed.
90
+
91
+ Oracle client library reads `sqlnet.ora` in the following locations:
92
+
93
+ * `$TNS_ADMIN/sqlnet.ora` if the environment variable `TNS_ADMIN`
94
+ is set and `$TNS_ADMIN/sqlnet.ora` exists.
95
+ Otherwise, `$ORACLE_HOME/network/admin/sqlnet.ora`.
96
+ * `$HOME/.sqlnet.ora`
97
+
98
+ [BEQUEATH_DETACH=YES]: https://docs.oracle.com/database/121/NETRF/sqlnet.htm#NETRF183
@@ -0,0 +1,63 @@
1
+ # @title Hanging After a Long Period of Inactivity
2
+
3
+ Hanging After a Long Period of Inactivity
4
+ =========================================
5
+
6
+ When a database connection hangs after a long period of inactivity,
7
+ this document may help you.
8
+
9
+ When a firewall or a NAT proxy resides between Oracle database server
10
+ and client, it sometimes drops inactive connections as dead ones. If a
11
+ client connects to an Oracle server and tries to use the connection
12
+ after a long sleep (> 1 hour), the client may hang in an effort to use the
13
+ dropped connection. This issue will be solved by setting TCP keepalive
14
+ packets whose keepalive time parameter is smaller than the inactive
15
+ connection timeout.
16
+
17
+ TCP keepalive is enabled by [(ENABLE=broken)][] in a connect
18
+ descriptor. If you use easy connect naming such as `//hostname/service_name`,
19
+ ruby-oci8 sets the parameter on behalf of you when the `tcp_keepalive`
20
+ property is set. (This is available since ruby-oci8 2.2.4.)
21
+
22
+ OCI8.properties[:tcp_keepalive] = true
23
+ conn = OCI8.new(username, password, '//hostname/service_name')
24
+
25
+ This is equivalent to the following:
26
+
27
+ connect_descriptor = "(DESCRIPTION=(ENABLE=broken)(ADDRESS=(PROTOCOL=tcp)(HOST=hostname)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=service_name)))"
28
+ conn = OCI8.new(username, password, connect_descriptor)
29
+
30
+ The default TCP keepalive time is two hours, which may be larger
31
+ than the inactive connection timeout. The default
32
+ value in the system is configurable via [procfs and sysctl on Linux][]
33
+ or [registry parameters on Windows][]. If you have no privilege to
34
+ customize the system, you can change per-connection keepalive time
35
+ by the `tcp_keepalive_time` property.
36
+
37
+ OCI8.properties[:tcp_keepalive_time] = 600 # 10 minutes
38
+
39
+ It is supported on the following platforms since ruby-oci8 2.2.4.
40
+
41
+ * Linux i386 and x86_64
42
+ * macOS
43
+ * Windows x86 and x64
44
+ * Solaris x86_64
45
+
46
+ When it is set on unsupported platforms, you get `NotImplementedError`.
47
+
48
+ This feature is implemented with hackish way. When
49
+ `tcp_keepalive_time` is set, Oracle client library's
50
+ procedure linkage table is modified to intercept [setsockopt][] system
51
+ call. When Oracle client library issues the system call which enables
52
+ TCP keepalive, [ruby-oci8 changes][] the per-connection TCP keepalive time
53
+ immediately.
54
+
55
+ I hope that Oracle adds a new OCI handle attribute to support this
56
+ feature natively in the future.
57
+
58
+ [(ENABLE=broken)]: https://docs.oracle.com/database/121/NETRF/tnsnames.htm#CHDCDGCE
59
+ [procfs and sysctl on Linux]: http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/usingkeepalive.html
60
+ [registry parameters on Windows]: https://blogs.technet.microsoft.com/nettracer/2010/06/03/things-that-you-may-want-to-know-about-tcp-keepalives/
61
+ [plthook]: https://github.com/kubo/plthook
62
+ [setsockopt]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/setsockopt.html
63
+ [ruby-oci8 changes]: https://github.com/kubo/ruby-oci8/blob/ruby-oci8-2.2.4/ext/oci8/hook_funcs.c#L302-L318
@@ -0,0 +1,44 @@
1
+ # @title Install Binary Package
2
+
3
+ Install Binary Package
4
+ ======================
5
+
6
+ Windows
7
+ -------
8
+
9
+ You need to install Oracle client in advance.
10
+ If you don't have installed Oracle client, install {file:docs/install-instant-client.md#Install_Oracle_Instant_Client_Packages instant client}. Only the Basic or Basic Lite package is needed to use ruby-oci8.
11
+ However it is better to install SQL*Plus also because it is usable to check whether
12
+ a problem is in Oracle setting or in ruby-oci8.
13
+
14
+ Run the following command to install ruby-oci8.
15
+
16
+ gem install ruby-oci8
17
+
18
+ If you uses mswin32 ruby, use the following command instead.
19
+
20
+ gem install --platform x86-mingw32 ruby-oci8
21
+ or
22
+ gem install --platform x64-mingw32 ruby-oci8
23
+
24
+ Other platforms
25
+ ---------------
26
+
27
+ We doesn't make binary gems for other platforms.
28
+ If you need to distribute a binary gem, compile ruby-oci8 and run the following command.
29
+
30
+ gem build ruby-oci8.gemspec -- current
31
+
32
+ Note that you need to compile it on the oldest versions of the platform you support
33
+ and for the oldest versions of the Oracle databases.
34
+
35
+ If you could not fix the Oracle versions, compile ruby-oci8 and make a gem as follows:
36
+
37
+ gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf -
38
+ cd ruby-oci8-VERSION
39
+ ruby setup.rb config -- --with-runtime-check
40
+ make
41
+ gem build ruby-oci8.gemspec -- current
42
+
43
+ When the option `--with-runtime-check` is set, ruby-oci8 checks the Oracle version
44
+ and available OCI functions at runtime.
@@ -0,0 +1,111 @@
1
+ # @title Install for Oracle Full Client
2
+
3
+ Install for Oracle Full Client
4
+ ==============================
5
+
6
+ Introduction
7
+ ------------
8
+
9
+ This page explains the way to install ruby-oci8 for Oracle Full Client
10
+ installations.
11
+
12
+ For Oracle Instant Client, look at {file:docs/install-instant-client.md}.
13
+ For Windows, look at {file:docs/install-binary-package.md} unless you
14
+ have a special need to compile ruby-oci8 by yourself.
15
+
16
+ Check the environment
17
+ ---------------------
18
+
19
+ ### Oracle installation
20
+
21
+ Run the following command and confirm it works fine. If it doesn't
22
+ work well, you need to ask to your database administrator.
23
+
24
+ sqlplus USERNAME/PASSWORD
25
+
26
+ ### ruby installation
27
+
28
+ Run the following command. If it ends with "can't find header files
29
+ for ruby" or "ruby: no such file to load -- mkmf (LoadError)", you need
30
+ to install ruby-devel(redhat) or ruby-dev(debian/ubuntu).
31
+
32
+ ruby -r mkmf -e ""
33
+
34
+ ### development tools
35
+
36
+ You need a C compiler and development tools such as make or nmake.
37
+ Note that they must be same with ones used to compile the ruby.
38
+ For example, you need Oracle Solaris Studio, not gcc, for ruby
39
+ compiled by Oracle Solaris Studio.
40
+
41
+ Installation
42
+ ------------
43
+
44
+ If you get a problem in the following steps, look at {file:docs/platform-specific-issues.md}
45
+ and {file:docs/report-installation-issue.md}.
46
+
47
+ ### Set the library search path
48
+
49
+ #### UNIX
50
+
51
+ Set the library search path, whose name depends on the OS, to point to
52
+ $ORACLE\_HOME/lib. If the database is 64-bit and the ruby is 32-bit,
53
+ use $ORACLE\_HOME/lib32 instead.
54
+
55
+ <table style="border: 1px #E3E3E3 solid; border-collapse: collapse; border-spacing: 0;">
56
+ <thead>
57
+ <tr><th> OS </th><th> library search path </th></tr>
58
+ </thead>
59
+ <tbody>
60
+ <tr><td> Linux </td><td> LD_LIBRARY_PATH </td></tr>
61
+ <tr><td> Solaris 32-bit ruby </td><td> LD_LIBRARY_PATH_32 or LD_LIBRARY_PATH </td></tr>
62
+ <tr><td> Solaris 64-bit ruby </td><td> LD_LIBRARY_PATH_64 or LD_LIBRARY_PATH </td></tr>
63
+ <tr><td> HP-UX PA-RISC 32-bit ruby </td><td> SHLIB_PATH </td></tr>
64
+ <tr><td> HP-UX PA-RISC 64-bit ruby </td><td> LD_LIBRARY_PATH </td></tr>
65
+ <tr><td> HP-UX IA64 </td><td> LD_LIBRARY_PATH </td></tr>
66
+ <tr><td> Mac OS X </td><td> DYLD_LIBRARY_PATH </td></tr>
67
+ <tr><td> AIX </td><td> LIBPATH </td></tr>
68
+ </tbody>
69
+ </table>
70
+
71
+ Do not forget to export the variable as follows:
72
+
73
+ $ LD_LIBRARY_PATH=$ORACLE_HOME/lib
74
+ $ export LD_LIBRARY_PATH
75
+
76
+ #### Windows(mswin32, mingw32, cygwin)
77
+
78
+ If sqlplus runs correctly, library search path has no problem.
79
+
80
+ ### gem package
81
+
82
+ Run the following command.
83
+
84
+ gem install ruby-oci8
85
+
86
+ ### tar.gz package
87
+
88
+ #### Download the source code
89
+
90
+ Download the latest tar.gz package from [download page][].
91
+
92
+ #### Run make and install
93
+
94
+ ##### UNIX or Windows(mingw32, cygwin)
95
+
96
+ gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf -
97
+ cd ruby-oci8-VERSION
98
+ make
99
+ make install
100
+
101
+ note: If you use '`sudo`', use it only when running '`make install`'.
102
+ '`sudo`' doesn't pass library search path to the executing command for security reasons.
103
+
104
+ ##### Windows(mswin32)
105
+
106
+ gzip -dc ruby-oci8-VERSION.tar.gz | tar xvf -
107
+ cd ruby-oci8-VERSION
108
+ nmake
109
+ nmake install
110
+
111
+ [download page]: https://bintray.com/kubo/generic/ruby-oci8