1

尝试通过 Ruby On Rails 连接到 oracle 时遇到问题 ( ruby -r oci8 -e "OCI8.new('hr', 'password').exec('SELECT * FROM jobs ORDER BY 1') {|r| puts r.join}" ),如下所示:

C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_re
quire.rb:46:in `require': incompatible library version - C:/RailsInstaller/Ruby1
.9.3/lib/ruby/site_ruby/1.9.1/i386-msvcrt/oci8lib.so (LoadError)
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:46:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/oci8.rb:20:in
`<top (required)>'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:46:in `require'
        from C:/RailsInstaller/Ruby1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/core_
ext/kernel_require.rb:46:in `require'

这是我正在使用的:

 1. ruby1.9.3p125 (2012-02-16) [i386-mingw32]
 2. Rails 3.2.1
 3. gem 2.0.3
 4. Windows 7
 5. Oracle 10g Express Edition

有人知道如何解决上述问题吗?

提前致谢。

4

1 回答 1

0

它将确保您安装的 oracle 客户端是 32 位的。

于 2014-02-21T17:46:21.203 回答