尝试通过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
任何人都知道如何解决上述问题?
提前致谢。
答案 0 :(得分:0)
这将确保您安装的oracle客户端是32位。