require "rubygems" require "mysql" # gem install ruby-mysql -v 2.9.2 my = Mysql.connect('127.0.0.1', 'root', '', 'noschema', 3307) p my.list_tables __END__ # look ma, no schema! ooh yeah. my.query("create table posts") # insert a few records into our schemaless MySQL store... :-) my.query("insert into posts values('first post'('author', 'Ilya'),('nick', 'igrigorik'))") my.query("insert into posts values('author:Ilya','location:Waterloo')") my.query("select author from posts") { |r| puts r } my.query("select nick from posts") { |r| puts r }