When you want ojdbc to use a database specified in TNSNAMES.ora you'll have to specify the location of the TNSNAMES.ora file:
if RUBY_PLATFORM =~ /java/
java.lang.System.setProperty("oracle.net.tns_admin", "/opt/oracle/network/admin")
end
This must be done in the application somewhere.
AFAIK @rsim's oracle-enhanced adapter for ActiveRecord is doing this in the adapter by looking at an environment variable called "TNS_ADMIN" (which is used by sqlplus to locate the TNSNAMES.ora).
When you want ojdbc to use a database specified in TNSNAMES.ora you'll have to specify the location of the TNSNAMES.ora file:
This must be done in the application somewhere.
AFAIK @rsim's oracle-enhanced adapter for ActiveRecord is doing this in the adapter by looking at an environment variable called "TNS_ADMIN" (which is used by sqlplus to locate the TNSNAMES.ora).