Last Updated: February 25, 2016
·
483
· buoyant

Rails Installer Mysql2 gem Windows

Copy libmysql.dll from mysql lib dir (C:\Program Files (x86)\MySQL\MySQL Server 5.6\lib) to ruby bin dir (C:\RailsInstaller\Ruby1.9.3\bin).

Run below line from git bash (doesn't work from windows powershell )

gem install mysql2 -- '--with-mysql-lib="c:\Program Files (x86)\MySQL\MySQL Server 5.6\lib" --with-mysql-include="c:\Program Files (x86)\MySQL\MySQL Server 5.6\include"'

# for specific version

gem install mysql2 -v=0.3.14 -- '--with-mysql-lib="c:\Program Files (x86)\MySQL\MySQL Server 5.6\lib" --with-mysql-include="c:\Program Files (x86)\MySQL\MySQL Server 5.6\include"'