For ruby-oci8 to work, it is important to install the instant client, the instant client SDK and the sqlplus instant client while we are on it. This is a good tool for :)
The best resource I could find on the Internet (works like a charm) is help.ubuntu.com, so a good reputable resource:
https://help.ubuntu.com/community/Oracle%20Instant%20Client
It uses rpms to install an instant client that can be executed through someone else's. In any case, all this is explained there.
To connect the OCI to your code, configure the TNS_ADMIN environment variable. I placed it in the same place as in the ubuntu community solution (in the same place where ORACLE_HOME is configured). I use the same folder standard as usual with oracle rdbms: network / admin.
For me it was: sudo vi / etc / profile.d / oracle.sh export ORACLE_HOME = / usr / lib / oracle / 11.1.0.1 / client export TNS_ADMIN = / usr / lib / oracle / network / admin
Then put your tnsnames.ora in the TNS_ADMIN folder.
Once this is done, just install the gem.
The Pearl WILL throw some errors / warnings, but they are not very important and still work. Reboot the session to get environment variables.
Nicolas de fontenay
source share