From: Raveendran Jazzez Date: 2008-05-06T15:29:59+09:00 Subject: Re: Very basic question | Ruby + MySql Hi CSongor, Try this. I am working windows here.I think it will work in Mac also.... TRY.rb *************************************************************** =begin OS : Windows here (May be same MAC OSx) Ruby : 1.8.6 DB :Mysql Gem :> gem install mysql =end require "mysql" #require mysql gem connection = Mysql.connect("localhost", "root", "", "cdcol") #localhost = hostname #root = username of mysql DB #""=password of mysql DB #cdcol = DB name output = connection.query("SELECT * FROM cds;") #cds = table name output.each do |x| puts x.inspect end *************************************************************** Regards, P.Raveendran Railsfactory http://raveendran.wordpress.com -- Posted via http://www.ruby-forum.com/.