title: How do I get Ruby's DBI gem properly installed so that it can talk to MySql?
body: <p>On my Windows 7 box, I've installed Ruby 1.9.2, and installed the following gems:</p>
  
  <p><strong>* LOCAL GEMS *</strong></p>
  
  <ul>
  <li>dbd-mysql (0.4.4) </li>
  <li>dbi (0.4.5) </li>
  <li>deprecated (2.0.1) </li>
  <li>httparty (0.8.1)</li>
  <li>rubygems-update (1.8.15)</li>
  </ul>
  
  <p>(I did this using gem install).</p>
  
  <p>I have also written the following simple test harness:</p>
  
  <pre><code>require 'rubygems'
  require 'dbi'
  
  begin
      dbh = DBI.connect("DBI:Mysql:test", "username", "pwd")
  
      row = dbh.select_one("SELECT VERSION()")
      puts "Server Version: "+row[0]
  rescue DBI::DatabaseError =&gt; e
      puts "An error occurred"
      puts "Error code: #{e.err}"
      puts "Error message: #{e.errstr}"
  ensure
      # disconnect from server
      dbh.disconnect if dbh
  end
  </code></pre>
  
  <p>Regardless of how I specify the connection string, I keep getting:</p>
  
  <pre><code>C:\Code\Concordance.SE&gt;ruby test_sql.rb
  C:/Tools/Ruby192/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi.rb:300:in `block in
  load_driver': Unable to load driver 'Mysql' (underlying error: uninitialized con
  stant DBI::DBD::Mysql) (DBI::InterfaceError)
          from C:/Tools/Ruby192/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
  
          from C:/Tools/Ruby192/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi.rb:242:
  in `load_driver'
          from C:/Tools/Ruby192/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi.rb:160:
  in `_get_full_driver'
          from C:/Tools/Ruby192/lib/ruby/gems/1.9.1/gems/dbi-0.4.5/lib/dbi.rb:145:
  in `connect'
          from test_sql.rb:4:in `&lt;main&gt;'
  </code></pre>
  
  <p>}</p>
  
  <p>What am I doing wrong?</p>