In this scenario, the OCI libraries will wait indefinitely for data to arrive, thus blocking indefinitely the application that initiated the query.
You can set a connect timeout, in seconds, using the following TNSNAMES parameters: You should set a timeout value dependant on your network topology, and the time needed to establish a TCP connection with your ORACLE server.
And copy this file to one of these locations: which means that use specified version or later patch versions (in this example any later 1.4.x version but not 1.5.x version).
If you would like to use latest adapter version from github then specify But it is recommended to use Bundler for gem version management also for Rails 2.3 applications (search for instructions in Google).
Oracle enhanced adapter version 5.2 supports Rails 5.2.