From: Mike Cahill Date: 2007-05-22T01:43:47+09:00 Subject: Re: Segmentation Fault when using MySql from Ruby - please help Not sure if this is your segfault... But you're using these in a way I haven't seen. I assign the connect call to an obj and query that... con_obj = Mysql.real_connect blah res_set = con_obj.query(blah) -----Original Message----- From: "Ronald Fischer" Date: Tue, 22 May 2007 01:27:27 To:ruby-talk@ruby-lang.org (ruby-talk ML) Subject: Segmentation Fault when using MySql from Ruby - please help Hello, I have installed the "mysql" gem for Ruby running on Windows. The version of mysql is 2.7.3, the version of Ruby is 1.8.5. When I run the following program: require 'mysql' mysql=Mysql.init Mysql.real_connect('localhost','gast','gast','test') mysql.query('select count(*) from t1') I get a segmentation fault at the last statement: ======================================================================== ======= ex1.rb:5: [BUG] Segmentation fault ruby 1.8.5 (2006-12-25) [i386-mswin32] This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. ======================================================================== ======= What am I doing wrong here? Usually I would assume that a SEGV means there is a bug in the Ruby implementation; but since my code is so simple and common (simply doing a SQL query), I suspect that it is in my code. Ronald -- Ronald Fischer Phone: +49-89-452133-162