DBI::InterfaceError: Could not load driver (uninitialized constant MysqlError)
问题 I have included gems, dbd-mysql (0.4.4) dbi (0.4.5) mysql (2.8.1) on rails console when I run the following code, require 'rubygems' require "dbi" require 'dbd-mysql' dbh = DBI.connect("DBI:Mysql:TestDB:localhost","username", "pwd") 1.9.2-p180 :001 > require 'rubygems' => false 1.9.2-p180 :002 > require "dbi" => false 1.9.2p180 :003 > require 'dbd-mysql' LoadError: no such file to load -- dbd-mysql from /.rvm/gems/ruby-1.9.2-p180@rails3/gems/dbi-0.4.5/lib/dbi.rb:318:in `rescue in load_driver'