Skip to content

Instantly share code, notes, and snippets.

@loveky
Last active December 15, 2015 11:29
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 loveky/5253549 to your computer and use it in GitHub Desktop.
Save loveky/5253549 to your computer and use it in GitHub Desktop.
Install Ruby mysql2 gem on Windows 7
  1. Download and install Ruby from RubyInstaller
  2. Download Development Kit and follow the installation instructions
  3. Download Mysql Connector/C and extract it into a path without spaces. For example c:\mysql-connector
  4. Run gem install mysql2 -- --with-mysql-include=c:\mysql-connector\include --with-mysql-lib=c:\mysql-connector\lib to install the gem.
  5. Copy c:\mysql-connector\lib\libmysql.dll to your Ruby bin path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment