简体   繁体   中英

Ruby gem 'ruby oci8' returning Error: 'OCI.DLL: 126(The specified module could not be found. ) (LoadError)'

My platform: - Ruby 2.2.2p95 (2015-04-13 revision 50295) [x64-mingw32] - Windows 7 64bit

I have install Oracle Instant client ie the following:

  • Oracle SDK
  • Oracle SQLPLUS
  • Oracle windows (I have the user variable path pointing to when Oracle windows install client oci.dll is installed - C:\\Users\\joebloggs\\Documents\\oracle\\oracle_windows\\instantclient_12_1)

And Ruby gems:

  • 'ruby-oci8'
  • 'activerecord'
  • 'activerecord-oracle_enhanced-adapter'

When I run my code to try before I even call this method from activerecord ActiveRecord::Base.establish_connection(...) I encounter the following error:

OCI.DLL: 126(The specified module could not be found.  ) (LoadError)
C:/Users/joebloggs/Documents/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
C:/Users/joebloggs/Documents/Ruby22-x64/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require' 
C:/Users/joebloggs/Documents/Ruby22-x64/lib/ruby/gems/2.2.0/gems/ruby-oci8-2.2.1-x64-mingw32/lib/oci8.rb:72:in `<top (required)>'

I cannot see where the problem is. The PATH user variable is correctly set to where the oci.dll is in the Oracle Windows directory. Can anyone please help?

Many thanks, Irvz.

我需要将'32bit'文件夹添加到$ PATH,而不是Instantclient安装的根文件夹。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM