Created
November 9, 2010 21:43
-
-
Save mid9commander/669876 to your computer and use it in GitHub Desktop.
the low down on oracle, database adapter, rails oracle connectivity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yes, I am unfortunately enough to have to connect to an Oracle database from Rails, and I hate the gut of it. But here are the steps of making it work. These steps are for Ubuntu Lucid | |
These instructions are for ruby-oci8 > 2.03, if you have to use an older version of oci8 you are in for some major grief | |
1. install oracle instant client, grab the basic, sql, devel rpm here | |
http://www.oracle.com/technetwork/topics/linuxsoft-082809.htmlhttp://www.oracle.com/technetwork/topics/linuxsoft-082809.html | |
2. apt-get install libaio1 apt-get install libaio1 | |
3. install alien, which converts a rpm file into a .deb file | |
apt-get install alien apt-get install alien | |
4. convert the rpm into debian package | |
alien oracle-instantclient11.1-basic-11.1.0.7.0-1.i386.rpm | |
alien oracle-instantclient11.1-devel-11.1.0.7.0-1.i386.rpm | |
alien oracle-instantclient11.1-sqlplus-11.1.0.7.0-1.i386.rpm | |
5. install the debian packages | |
dpkg -i oracle-instantclient11.1-basic_11.1.0.7.0-2_i386.deb oracle-instantclient11.1-devel_11.1.0.7.0-2_i386.deb oracle-instantclient11.1-sqlplus_11.1.0.7.0-2_i386.debdpkg -i oracle-instantclient11.1-basic_11.1.0.7.0-2_i386.deb oracle-instantclient11.1-devel_11.1.0.7.0-2_i386.deb oracle-instantclient11.1-sqlplus_11.1.0.7.0-2_i386.deb | |
6. your package should be installed in /usr/lib/oracle/11.2 | |
7. set 2 ENV variable in your bash file | |
LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib | |
ORACLE_HOME=/usr/lib/oracle | |
8. sudo mdkir -p /usr/lib/oracle/network/admin | |
9. add tns stuff to tnsname.ora in /usr/lib/oracle/network/admin | |
10. done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment