kubo / ruby-oci8

Ruby-oci8 - Oracle interface for ruby
Other
169 stars 75 forks source link

`require': OCI.DLL: 126(The specified module could not be found. ) (LoadError) #166

Closed ankita-miipl closed 7 years ago

ankita-miipl commented 7 years ago

I am trying to connect remote oracle database from rails 5 app.. i have added activerecord-oracle_enhanced-adapter and ruby-oci8 gem in my rails app. Now i am trying to do rails s and it gives

C:/RailsInstaller/Ruby2.3.0/lib/ruby/gems/2.3.0/gems/ruby-oci8-2.2.3-x86-mingw32/lib/oci8.rb:72:in `require': OCI.DLL: 126(The specified module could not be found. ) (LoadError)

I am using windows 8 and ruby ruby 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32]

ankita-miipl commented 7 years ago

on windows 8 & ruby 2.3.3.. following this steps worked for me..

http://www.oracle.com/technetwork/topics/winsoft-085727.html

Version 11.2.0.1.0 Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications Download instantclient-basic-win32-11.2.0.1.0.zip (51,458,190 bytes)

HOST = "your host" PORT = XXXX #your port number SID = 'your SID'

ActiveRecord::Base.establish_connection( adapter: 'oracle_enhanced', database: "(DESCRIPTION= (ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=#{HOST})(PORT=#{PORT}))) (CONNECT_DATA=(SID=#{SID})) )", username: 'user', password: 'secret' )