Last Updated: February 25, 2016
·
576
· hpneo

mysql2 gem on Windows

Even using RailsInstaller in Windows doesn't ensure a troubleless programming life. One of the first problems is using MySQL.
You must follow these steps to work with Ruby and MySQL:

  1. Install the gem with gem install mysql2. This shouldn't report any problem.
  2. Download this file: http://cdn.mysql.com/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip. Then copy lib\libmysql.dll into your Ruby bin directory (Like C:\RailsInstaller\Ruby1.9.3\bin)

And... That's it!