簡體   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