Rails:gem install mysql2 is not working

This problem happened to me. Unfortunately there is a slight difference, I am using a 32 bit Windows Vista.

This answer helped me, though not enough

downloaded and installed MySQL 64bit version 5.5
downloaded the zip archive for the 32bit version 5.5
extracted the 3├ębit include and lib folders to C:\MySQL
installed ruby 1.9.2
installed the ruby devkit
installed the gems:
gem install mysql
gem install mysql2 — –with-mysql-lib=C:\MySQL\lib –with-mysql-include=C:\MySQL\include
gem install rails
gem install fastthread
gem install haml
Working as a charm now. Seems the mySQL gem has issues finding the data when dealing with 64bit.

So what I did is download the Windows (x86, 32-bit), ZIP Archive instead from http://dev.mysql.com/downloads/mysql/, extracted it to a certain folder and pointed the gem installer to that location.

After this, I executed

gem install mysql2 -v 0.3.6 -- --with-mysql-lib=path\to\mysql\lib --with-mysql-include=path\to\mysql\include
C:\Windows\System32>gem install mysql2 -v 0.3.6 -- --with-mysql-lib=C:\apps\thir
ds\mysql\mysql-5.5.15-win32\lib --with-mysql-include=C:\apps\thirds\mysql\mysql-
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed mysql2-0.3.6
1 gem installed
Installing ri documentation for mysql2-0.3.6...
Enclosing class/module 'mMysql2' for class Client not known
Installing RDoc documentation for mysql2-0.3.6...
Enclosing class/module 'mMysql2' for class Client not known


Though English is my country's official language it is not my native tongue. If you find anything wrong with my phrases, or any incorrect information, write it out loud in the comments section. The world will be a bit better that way.
Tagged with: ,
Posted in Javascript

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre user="" computer="" escaped="">