Doing emerge ruby-dbi with USE="mysql" does not quite work. Running it results in this message: class/module (TypeError) from /usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:392:in `_get_full_driver' from /usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:372:in `connect' from ./db.rb:10 because the library from mysql-ruby is missing. It should be marked as a conditional dependency in the ebuild. After doing emerge mysql-ruby, everything worked just fine.
Thanks, I've fixed mysql and postgresql. Looks like firebird and odbc are probably still broken, though.