Monday, November 3, 2014

Rails Installer Mysql2 gem Windows Fix

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 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"'
view raw mysql2win hosted with ❤ by GitHub