0

I'm trying to install mysql2 gem but I'm having a problem, I know that there are many posts about it, but I tryed those solutions and none of them works.

C:>gem install mysql2

Temporarily enhancing PATH to include DevKit... Building native extensions.

This could take a while... ERROR: Error installing mysql2:

ERROR: Failed to build gem native extension.

C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb checking for ruby/thread.h... no checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes checking for rb_hash_dup()... yes checking for rb_intern3()... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lm... yes checking for mysql_query() in -lmysqlclient... no checking for main() in -lz... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lsocket... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lnsl... no checking for mysql_query() in -lmysqlclient... no checking for main() in -lmygcc... no checking for mysql_query() in -lmysqlclient... no extconf.rb failed Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You 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:/RailsInstaller/Ruby1.9.3/bin/ruby --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysql-config --without-mysql-config --with-mysql-dir --without-mysql-dir --with-mysql-include --without-mysql-include=${mysql-dir}/include --with-mysql-lib --without-mysql-lib=${mysql-dir}/lib --with-mysqlclientlib --without-mysqlclientlib --with-mlib --without-mlib --with-mysqlclientlib --without-mysqlclientlib --with-zlib --without-zlib --with-mysqlclientlib --without-mysqlclientlib --with-socketlib --without-socketlib --with-mysqlclientlib --without-mysqlclientlib --with-nsllib --without-nsllib --with-mysqlclientlib --without-mysqlclientlib --with-mygcclib --without-mygcclib --with-mysqlclientlib --without-mysqlclientlib Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9 .1/gems/mysql2-0.3.16 for inspection. Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/mysql2-0. 3.16/ext/mysql2/gem_make.out

Silva_PT_SCP
  • 557
  • 2
  • 8
  • 20
  • You should never use Windows for ruby on rails development. Lots of problems arise and very slow development time. Sometimes you even miss the necessary compilers, it's a hassle. I would recomment you install a linux much easier and you will setup your environments really easily. – Oss Nov 10 '14 at 01:22
  • Thanks for the adivice. Is there any problem of using linux on a Virtual Machine @MohamedOsama ?? – Silva_PT_SCP Nov 10 '14 at 01:24
  • It's still a hassle. If you don't assign enough memory for your VM then most probably it would lag a lot and after all a VM is not like a full running operating system. In Fedora for example, you will just `bundle install` and run `service mysqld start` and your mysql server will be running. COnfigure your database in `database.yml` and you won't worry about anything else. – Oss Nov 10 '14 at 01:28
  • possible duplicate http://stackoverflow.com/questions/19014117/ruby-mysql2-gem-installation-on-windows-7 – Sam Nov 10 '14 at 01:40

0 Answers0