rake db:create Segmentation Fault (mysql 6.0.0)

Hi I'm new to this. Today I installed the mysql gem and when I attempted db:create ruby told me that "This gem was compiled for 6.0.0 but the client library is 5.5.15"

I then installed mysql 6.0.0 and copied the resulting libmySQL.dll into the ruby193\bin folder.

I then got a "could not read instruction at..." error dialog and in the console I found this:

"mysql2-0.3.11-x86-mingw32/lib/mysql2/client.rb:24: [BUG] Segmentation fault"

The error is quite clear: you used a libmysql.dll from a different version of MySQL than the one used to compile the gem you installed.

libmysql.dll do not maintain binary compatibility between versions, so binary gems compiled for a version of MySQL run old and break with newer releases of MySQL.

You can avoid all that by installing RubyInstaller's DevKit and compile the gem like any other user on any other platform.

Instructions for "mysql" gem are here:

http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/

Please read the instructions *fully* before reporting it doesn't work. Take in consideration:

* It assumes you already installed Ruby and RubyInstaller DevKit following the website instructions:

https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

* You downloaded a *32bits* version of MySQL Connector/C

* It assumes you installed Ruby and you extracted MySQL Connector/C in a folder *without spaces*. It is extremely important you don't install neither Ruby, DevKit or extract MySQL Connector/C in a folder with spaces.

* Last but no least: you use the gem install flags properly. Example:

gem install mysql --platform=ruby -- --with-mysql-dir=C:/mysql- connector-6.0.2-win32

Note the force of platform and the double dashes before "--with-mysql- dir" option. Also note the use of forward slashes instead of backslashes.

Hope that helps.