ruby1.9.3 gem install ibm_db 安装好了 2.5.9 版本的 ibm_db irb require 'ibm_db'
马上报错。 require 'mswin32/ibm_db',一样报错
irb(main):004:0> require 'ibm_db'
NameError: uninitialized constant ActiveRecord::ConnectionNotEstablished
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activerecord-3.0
.9/lib/active_record/connection_adapters/abstract/connection_pool.rb:9
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_
require.rb:36:in `gem_original_require'
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_
require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activerecord-3.0
.9/lib/active_record/connection_adapters/abstract_adapter.rb:11
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_
require.rb:36:in `gem_original_require'
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_
require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/ibm_db-2.5.9-x86
-mingw32/lib/active_record/connection_adapters/ibm_db_adapter.rb:11
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_
require.rb:36:in `gem_original_require'
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_
require.rb:36:in `require'
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/ibm_db-2.5.9-x86
-mingw32/lib/ibm_db.rb:2
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_
require.rb:57:in `gem_original_require'
from C:/RailsInstaller/Ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_
require.rb:57:in `require'
from (irb):4
from :0
后来试 ruby 1.8.7,同样报错。 再试 ibm_db 2.5.6,2.5.7....报错报错。
折腾了 3 天了,一点进展没有。 换过 railsinstaller、railFTW 的环境,都不管用,之前以为是什么兼容问题。