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

时间:2016-03-14 14:25:12

标签: ruby windows oracle activerecord oci8

我的平台:   - 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。

1 个答案:

答案 0 :(得分:0)

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

相关问题