From: Erik Hollensbe Date: 2008-10-16T02:05:15+09:00 Subject: Re: Using DBI and MySQL gems Owein Herrmann wrote: >> I don't know if this is recommended usage anymore, but provided you >> haven't installed dbi with the provided setup.rb, "require 'dbi'" should >> work without the gem statements. > Hmmmm... that definitely does not work. When I say "require 'dbi'" it > returns true, but then dbh = DBI.connect('DBI:Mysql:money', 'mysqluser', > 'pass3') causes an exception about DBI not being defined... I'm not on > my ruby box right now, so I cannot give the exact notation... basically, > what I show above works, the two gem commands and then the require. Is this 1.9? I'm not sure how rubygems would be automatically required in 1.8.x. I guess it's also possible that the require overrides have been removed from rubygems. require_gem has been deprecated for some time and probably has been removed by now. Well, either way, I can test it at home (personally, I prefer the gem statements to magic, moving-target require statements) but it doesn't seem like your problem has anything to do with DBI or DBI::DBD::Mysql, but either rubygems or your misunderstanding of the version you're working with. -Erik -- Posted via http://www.ruby-forum.com/.