我的平台: - Ruby 2.2.2p95(2015-04-13修订版50295)[x64-mingw32] - Windows 7 64位
我已安装Oracle Instant客户端,即以下内容:
- Oracle SDK
- Oracle SQLPLUS
- Oracle windows(我将用户变量路径指向Oracle windows安装客户端oci.dll的位置 - C:\ Users \ joebloggs \ Documents \ oracle \ oracle_windows \ instantclient_12_1)
以及Ruby宝石:
- 'ruby-oci8'
- 'activerecord'
- 'activerecord-oracle_enhanced-adapter'
当我运行代码并在调用此方法之前尝试时,从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。