On Feb 4, 2:59 pm, "Timothy M." <li...@ruby-forum.com> wrote:
> 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.

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.

--
Luis Lavena

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to