error Message
ERROR: Error installing mysql-2.9.0.gem: ERROR: Failed to build gem native extension.
the solution is mainly referred to "2. Installation failure problem handling":
Step1.
Download the Mysql-connector-c-noinstall-6.0.2-win32 and unzip to the directory
Step 2. Add when executing Geminstall--with-mysql-lib,The --with-mysql-include parameter. Gem install mysql-v 2.9.0--platform=ruby----with-mysql-lib=c:\mysql-connector-c-noinstall-6.0.2-win32\lib-- With-mysql-include=c:\mysql-connector-c-noinstall-6.0.2-win32\include
Note: The commands provided in the article are not used properly (may also be related to Win7 environment)
gem install MySQL--Platform=Ruby-- -- with-MySQL-dir=C:/MySQL-connector-C-Noinstall-6.0.2-Win32
Reference Resources:
1 Installation msql Instructionshttp://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/
2. Installation failure problem handlingHttp://stackoverflow.com/questions/13604362/installing-mysql-2-9-0-gem-on-windows-fails-due-to-lack-of-libmysql
Win7 +ruby environment require "MySQL" Error resolution