I have been snooping around this forum for a while so hopefully i have posted this the correct place. I need help getting oracle to work. I have read a lot of posts and search google but i believe my situation may be unique
I use aptana to program in ruby on rails. I am trying to connect to a remote oracle database on a different network that i do not control. Although i cannot see the point of it, i have setup the instant client package from oracle.com. I have not setup a tnsnames.ora file. Ofcourse, I setup a tunnel to the remote network, so i access the database through localhost.
Now please note, very important here, I can clearly see all of my oracle databases, in aptana dataview, which means that my database.yml file as well as my tunnel, should be configured correctly. I can send sql queries to the database successfully
The problem occurs when i try to innitiate a connection to the database through a model. I have tried the following code in my model :
1) ActiveRecord::Base::establish_connection( :adapter => "oracle", #same file as oci_adapter just renamed correct? :host => "ip/sid", :user => "user, :password =>"pass" ) ............. 2) establish_connection("name setup in the database.yml file")
etc etc etc.... Just about every possible combiniation of the above. I have also gotten all of the errors one could expect like ORA-12560 etc.
How do i rectify this situation? The yml file seems setup correctly and i can communicate with the database, just not when i actually need to interact with it through the model.