ruby on rails - ERROR: Error installing mysql: ERROR: Failed to build gem native extension -


i followed "http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/" setting connection between ruby on rails app , mysql server 5.1

so when install mysql gem following command:

gem install mysql --platform=ruby -- --with-mysql-dir=c:/mysql-connector-c-noinstall-6.0.2-win32 

so i'm getting following error log:

temporarily enhancing path include devkit...
building native extensions. take while...
error: error installing mysql:
error: failed build gem native extension.

   c:/ruby187/bin/ruby.exe extconf.rb --with-mysql-dir=c:/mysql-connector-c 

-noinstall-6.0.2-win32 checking main() in -llibmysql... no * extconf.rb failed * not create makefile due reason, lack of necessary libraries and/or headers. check mkmf.log file more details. may need configuration options.

provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=c:/ruby187/bin/ruby
--with-mysql-dir
--with-mysql-include
--without-mysql-include=${mysql-dir}/include
--with-mysql-lib
--without-mysql-lib=${mysql-dir}/lib
--with-libmysqllib
--without-libmysqllib

gem files remain installed in c:/ruby187/lib/ruby/gems/1.8/gems/mysql-2.9.1 inspection. results logged c:/ruby187/lib/ruby/gems/1.8/gems/mysql-2.9.1/ext/mysql_api/ge m_make.out

extra info: ruby version 1.8.7 windows 7 64 bit mysql version 5.1

  1. download mysql/c connector zip file.

  2. unzip specific folder c: drive.

  3. copy libmysql.dll mysql/c connector zip file.

  4. try command gem install mysql --platform=ruby -- --with-mysql-lib=c:\mysql-c-connector\lib --with-mysql-include=c:\mysql-c-connector\include


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -