From: luke gruber Date: 2011-11-05T03:26:51+09:00 Subject: Re: Inserting to the mysql table in ruby Assuming you're using a low-level gem like ruby-mysql like Brian mentioned above, the query might have thrown an error because of forgotten single quotes around string values. > @connect.query('INSERT INTO person VALUES(first,second)') should probably be: @connect.query("INSERT INTO person VALUES('#{first}', '#{second#}'") And, like Brian mentioned, try the DBI gem, which isn't overkill for anyone's needs because it protects against SQL injection attacks. -Luke -- Posted via http://www.ruby-forum.com/.