Skip to content

Instantly share code, notes, and snippets.

@schmich
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schmich/0aacec313beac27699a8 to your computer and use it in GitHub Desktop.
Save schmich/0aacec313beac27699a8 to your computer and use it in GitHub Desktop.
Install mysql2 gem on Windows
set DIR=%TEMP%\mysql\mysql-connector-c-noinstall-6.0.2-winx64
mkdir %DIR%
cd %DIR%\..
curl -O -L https://copy.com/CHZ4eT4us6f1/mysql-connector-c-noinstall-6.0.2-winx64.zip?download=1
(extract zip)
gem install mysql2 -- --with-mysql-lib=%DIR%\lib --with-mysql-dir=%DIR% --with-mysql-include=%DIR%\include
for /f %d in ('where ruby ^| head -1 ^| xargs -0 dirname') do copy %DIR%\lib\libmysql.dll %d
gem install activerecord-mysql2-adapter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment