简体   繁体   English

Ruby gem'ruby oci8'返回错误:'OCI.DLL:126(无法找到指定的模块。)(LoadError)'

[英]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 我的平台: - Ruby 2.2.2p95(2015-04-13修订版50295)[x64-mingw32] - Windows 7 64位

I have install Oracle Instant client ie the following: 我已经安装了Oracle Instant Client,即:

  • Oracle SDK Oracle SDK
  • Oracle SQLPLUS 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) Oracle windows(安装了Oracle Windows安装客户端oci.dll时,我有指向用户变量的路径 - C:\\ Users \\ joebloggs \\ Documents \\ oracle \\ oracle_windows \\ instantclient_12_1)

And Ruby gems: 和Ruby宝石:

  • 'ruby-oci8' “红宝石OCI8”
  • 'activerecord' 的ActiveRecord“
  • 'activerecord-oracle_enhanced-adapter' 的ActiveRecord-oracle_enhanced适配器“

When I run my code to try before I even call this method from activerecord ActiveRecord::Base.establish_connection(...) I encounter the following error: 当我运行我的代码尝试之前我甚至从activerecord ActiveRecord :: Base.establish_connection(...)调用此方法时遇到以下错误:

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. PATH用户变量已正确设置为oci.dll在Oracle Windows目录中的位置。 Can anyone please help? 有人可以帮忙吗?

Many thanks, Irvz. 非常感谢,Irvz。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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