Du behöver MySQL 32-bitars (eller MySQL Connector C
) för att kompilera mysql2 gem kompilering på Windows (även om du använder en 64-bitarsversion av operativsystemet).
Följ dessa steg:
- Ladda ned MySQL Server 32-bitars .zip-fil (alternativt MySQL Connector C är också bra)
- Kopiera
libmysql.dlltill%RUBY_HOME%\bin(eller helt enkelt lägg till MySQL 32-bitarslibkatalog till PATH) -
Installera mysql2 gem med
--with-mysql-liboch--with-mysql-includealternativgem 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"'