From: Idealone Ideally Date: 2010-01-27T14:51:03+09:00 Subject: Re: How to connect to Mysql & Query for Database Tables Jeff Peng wrote: >> Hi Guys, >> Ruby imposes several way of connecting to Mysql (DBI,activerecord..) >> Database using ruby code. Let me know if anybody knows how to connect to >> mysql the easiest way. > > > DBI is generally an easy way. > http://www.kitebird.com/articles/ruby-dbi.html > > You have to > gem install mysql > gem install dbd-mysql > gem install dbi > before using it. > > HTH. Hi, On Trying, " gem install mysql " , i get the following error: C:\Documents and Settings\user1\Desktop>gem install mysql Building native extensions. This could take a while... ERROR: Error installing mysql: ERROR: Failed to build gem native extension. D:/Softwares/ruby/bin/ruby.exe extconf.rb checking for main() in libmysql.lib... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for mo details. Thanks -- Posted via http://www.ruby-forum.com/.