In order to use oracle connection for your ruby on rails at windows, you have to do the following.
1. Install oracle instant client.
You can install any version of oracle, but oracle instant client is the easiest one to install.
Download it at http://download-llnw.oracle.com/otn/nt/instantclient/112010/instantclient-basic-win32-184.108.40.206.0.zip
After that, extract the files into C:/program files, or any directories that you like. Then add the instant client path to the environment variables ‘Path’.
2. Install Ruby Oracle library ruby-oci8
This library allows your rails application to talk to your oracle database server. It is a ruby interface for oracle to use OCI8 (Oracle Call Interface) API. The Oracle Call Interface (OCI) is an application programming interface (API) which allows developers to build applications using low-level C and C++ function calls to access an Oracle database server. Similarly, not only does OCI allow users to control all aspects of SQL statement execution, but it also fully supports the datatypes, calling conventions, syntax, and semantics of C and C++. (Extract from Oracle Wiki). Install using the following command:
gem install ruby-oci8
Do note that before installing ruby-oci8, make sure you have oracle instant client installed otherwise the OCI8 library will not be available on your machine.
3. Install activerecord-oracle_enhanced-adapter
Oracle “enhanced” ActiveRecord adapter contains useful additional methods for working with new and legacy Oracle databases from Rails. Refer to this gem’s github page for more details.
gem install activerecord-oracle_enhanced-adapter
Now you are free to use oracle connection in your rails applications. If you want to modify your database.yml to connect to oracle when in production, change the database.yml’s production entry to the following:
In case you still got problem, you can reference here for trouble shooting: https://github.com/rsim/oracle-enhanced/wiki/troubleshooting