V
Venks
Hi,
I am getting "segmentation fault" when I try to run the following
piece of ruby code.
1) I installed the latest version of MySQL version for Windows 5.1.22
2) I installed the MySQL module using "gem install mysql" and chose
option 1 (mysql 2.7.3. win32)
I don't have this problem on Linux running Fedora. Unfortunately I
really need to make this work on my laptop running windows where most
of the development will be done.
Thanks,
-Venks
==============================================================
#!/usr/bin/ruby -w
# Ruby script using Ruby MySQL module to test connection information
require "mysql"
begin
dbh = Mysql.real_connect("localhost", "csread", "csread", "csapp")
puts "Client Info: " + dbh.get_client_info
rescue Mysql::Error => e
puts "Error code: #{e.errno}"
puts "Error message: #{e.error}"
puts "Error SQLSTATE: #{e.sqlstate}" if e.respond_to?("sqlstate")
ensure
dbh.close if dbh
end
====================================================================
I am getting "segmentation fault" when I try to run the following
piece of ruby code.
1) I installed the latest version of MySQL version for Windows 5.1.22
2) I installed the MySQL module using "gem install mysql" and chose
option 1 (mysql 2.7.3. win32)
I don't have this problem on Linux running Fedora. Unfortunately I
really need to make this work on my laptop running windows where most
of the development will be done.
Thanks,
-Venks
==============================================================
#!/usr/bin/ruby -w
# Ruby script using Ruby MySQL module to test connection information
require "mysql"
begin
dbh = Mysql.real_connect("localhost", "csread", "csread", "csapp")
puts "Client Info: " + dbh.get_client_info
rescue Mysql::Error => e
puts "Error code: #{e.errno}"
puts "Error message: #{e.error}"
puts "Error SQLSTATE: #{e.sqlstate}" if e.respond_to?("sqlstate")
ensure
dbh.close if dbh
end
====================================================================