Je hebt MySQL 32-bit (of MySQL Connector C
nodig ) om mysql2 te compileren gem compileren op Windows (zelfs als u een 64-bits versie van het besturingssysteem gebruikt).
Volg deze stappen:
- Download MySQL Server 32-bit .zip-bestand (Alternatief MySQL Connector C is ook goed)
- Kopieer
libmysql.dllnaar%RUBY_HOME%\bin(of voeg eenvoudig MySQL 32-bitlibtoe directory naar PATH) -
Installeer mysql2 gem met
--with-mysql-liben--with-mysql-includeoptiesgem install mysql2 -- '--with-mysql-lib="c:\path\to\32-bit-MySQL-Server\lib\opt" --with-mysql-include="c:\\path\to\32-bit-MySQL-Server\include"'