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 the
console reported this:
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:
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.
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.
–
Luis L.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.