繁体   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)'

我的平台: - Ruby 2.2.2p95(2015-04-13修订版50295)[x64-mingw32] - Windows 7 64位

我已经安装了Oracle Instant Client,即:

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

和Ruby宝石:

  • “红宝石OCI8”
  • 的ActiveRecord“
  • 的ActiveRecord-oracle_enhanced适配器“

当我运行我的代码尝试之前我甚至从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)>'

我看不出问题出在哪里。 PATH用户变量已正确设置为oci.dll在Oracle Windows目录中的位置。 有人可以帮忙吗?

非常感谢,Irvz。

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

暂无
暂无

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

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