oracle_client_installer 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/CHANGES +4 -0
- data/README.md +22 -17
- data/lib/oracle_client_installer/oracle_client_installer.rb +2 -0
- data/lib/oracle_client_installer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjNiN2M2YTU3Y2ZkN2U3YWNkNDBlZGRhYmU1ZmZlMTNmZDFmZDlkNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDMwZTc2ODIyNDI4ODQ4M2FlZDY4YjYwYTNkZjAzNmUwNmMwYTJkYw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmIyZjFiODNlNTU0NjU2NDdmZWZmZTcwMjc2YWM2MWRkZDQzYzRiMzA3NmM1
|
10
|
+
OTUxODBhMjY4ODRmZjY1ZWZlN2Q1NmI1NjkyMTQ0MjEyYzBhMzg0MGI2MTZj
|
11
|
+
YzliMDA4YTgwZjY2OWU1OWYyYTBkNDVkNjRhNmRjNjg5YWMzOGU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MGU4NzZmYTkxOGFmNzUyMzkxOGI2NmUwMjE0M2M2MjVkODczNDE3MzMzN2Ew
|
14
|
+
NTIxNTU2YTU1MWQ4N2M4YzU5Y2FiYzNmNzZiYTVjODcxODEzYTYxNmE3YWE1
|
15
|
+
YWZmMTNlNTdhMDg4ZDRiMWM3NjZmNmE1ZTM4NDU1Yzg1ODY1Mzk=
|
data/CHANGES
CHANGED
data/README.md
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
Installing database driver for Oracle (activerecord-oracle_enhanced-adapter) is not a simple process.
|
6
6
|
First, you need to install Instant Client. Second, you have to install ruby wrapper around Instant Client
|
7
7
|
(ruby-oci8 gem). On some platforms second step requires compiling source code. Only after that
|
8
|
-
you can install oracle database driver. Here we discuss how to do it for
|
8
|
+
you can install oracle database driver. Here we discuss how to do it for OSX 10.X operating system.
|
9
9
|
|
10
10
|
## Create new gem group
|
11
11
|
|
12
12
|
Create separate group (e.g. "oracle") in Gemfile for oracle ruby-oci8 client wrapper. You have to keep
|
13
|
-
this gem in separate group because it requires special steps done before
|
13
|
+
this gem in separate group because it requires special steps done before database driver can be installed.
|
14
14
|
|
15
15
|
```ruby
|
16
16
|
# Gemfile
|
@@ -28,6 +28,8 @@ Install ruby gems for your project with bundler tool. You have to bypass oracle
|
|
28
28
|
bundle install --without=oracle
|
29
29
|
```
|
30
30
|
|
31
|
+
**without** parameter will exclude **oracle** gem group from execution.
|
32
|
+
|
31
33
|
Check that you don't have ruby-oci8 installed yet:
|
32
34
|
|
33
35
|
```bash
|
@@ -36,13 +38,13 @@ gem list
|
|
36
38
|
|
37
39
|
## Download Oracle Instant Client
|
38
40
|
|
39
|
-
Download Oracle Instant Client packages and save
|
41
|
+
Download Oracle Instant Client packages and save them locally (e.g. in "downloads" folder). You can find
|
40
42
|
installation packages on **www.oracle.com** web site (you have to be registered user though).
|
41
43
|
|
42
44
|
## Configuration file
|
43
45
|
|
44
46
|
Create configuration file for the installation (.oracle_client_installer.json) in the root of your project.
|
45
|
-
It will
|
47
|
+
It will define where you have downloaded files and some other parameters:
|
46
48
|
|
47
49
|
```json
|
48
50
|
{
|
@@ -64,15 +66,15 @@ It will tell where have you downloaded files and some other parameters:
|
|
64
66
|
}
|
65
67
|
```
|
66
68
|
|
67
|
-
We are going to run ruby from **ruby_home** on behalf of **user** and use specific versions
|
68
|
-
**oracle** and **ruby-oci8** gem. We also specify where to look for installation packages (src_dir)
|
69
|
-
and where to install Instant Client (dest_dir). Also, as you can see, we are using **macos** as platform
|
70
|
-
and **x64** as architecture.
|
69
|
+
We are going to run ruby from **ruby_home** on behalf of the **user** and we will use specific versions
|
70
|
+
of **oracle** client and **ruby-oci8** gem. We also specify where to look for installation packages (src_dir)
|
71
|
+
and where to install Instant Client (dest_dir). Also, as you can see, we are using **macos** as a platform
|
72
|
+
and **x64** as an architecture.
|
71
73
|
|
72
74
|
## Provide execution script
|
73
75
|
|
74
76
|
Library itself if written in ruby, but for launching you can use **rake** or **thor** tools. I provide
|
75
|
-
thor script here:
|
77
|
+
thor script here as an example:
|
76
78
|
|
77
79
|
```ruby
|
78
80
|
require 'thor'
|
@@ -112,17 +114,18 @@ end
|
|
112
114
|
|
113
115
|
## Install Oracle Instant Client
|
114
116
|
|
115
|
-
Run this thor command:
|
117
|
+
Run this **thor** command:
|
116
118
|
|
117
119
|
```bash
|
118
120
|
thor oracle_client:install
|
119
121
|
```
|
120
122
|
|
121
|
-
After execution all packages will be installed at right location
|
123
|
+
After execution all Instant Client packages (basic, sdk and sqlplus) will be installed at the right location
|
124
|
+
(dest_dir) on your computer.
|
122
125
|
|
123
126
|
## Again: install gems for the project (now with ruby-oci8 gem)
|
124
127
|
|
125
|
-
Remove .bundle in order to include "oracle" group into bundle execution and
|
128
|
+
Remove .bundle folder in order to include "oracle" group into bundle execution and
|
126
129
|
then run bundler with "oracle" group:
|
127
130
|
|
128
131
|
```bash
|
@@ -131,7 +134,7 @@ rm -rf .bundle
|
|
131
134
|
bundle
|
132
135
|
```
|
133
136
|
|
134
|
-
## Verify the
|
137
|
+
## Verify the installation
|
135
138
|
|
136
139
|
If you have Oracle installed locally with **scott/tiger/ORCL**, you can test it now:
|
137
140
|
|
@@ -139,11 +142,11 @@ If you have Oracle installed locally with **scott/tiger/ORCL**, you can test it
|
|
139
142
|
thor oracle_client:verify
|
140
143
|
```
|
141
144
|
|
142
|
-
# General notes
|
143
|
-
|
144
145
|
If you have oracle installed somewhere on network, you can add TNS names inside your
|
145
146
|
**tnsnames.ora** file located inside **/usr/local/oracle/network/admin** folder. You can set up
|
146
|
-
this location via **tns_admin_dir** property
|
147
|
+
this location via **tns_admin_dir** property inside your configuration file.
|
148
|
+
|
149
|
+
tnsnames.ora file will have this section:
|
147
150
|
|
148
151
|
```
|
149
152
|
MY_ORCL=
|
@@ -159,6 +162,8 @@ MY_ORCL=
|
|
159
162
|
)
|
160
163
|
```
|
161
164
|
|
165
|
+
where you define **MY_ORCL** schema on **db.your_host.com** running on **1521** port.
|
166
|
+
|
162
167
|
In order to use oracle driver inside rails application, you have to include it into Gemfile:
|
163
168
|
|
164
169
|
```ruby
|
@@ -170,7 +175,7 @@ group :oracle do
|
|
170
175
|
end
|
171
176
|
```
|
172
177
|
|
173
|
-
# Summary: all steps together
|
178
|
+
# Summary: all steps all together
|
174
179
|
|
175
180
|
```bash
|
176
181
|
bundle install --without=oracle
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oracle_client_installer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Shvets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: text-interpolator
|