I recently installed Ruby on rails and MySQL.
The versions are ruby 2.1.7 and MySQL Workbench 6.3 CE.
I typed gem install mysql2 -v=0.2.6
and this happened;
Fetching: mysql2-0.2.6.gem <100%>
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
Error: Failed to build gem native extensions.
C:/Ruby21/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... yes
checkimg for main() in -llibmysql... 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 option:
--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=.
--curdit
--ruby=C:Ruby21/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-libmysqllib
--without-libmysqllib
extconf failed, exit code 1
Gem files will remain installed in C:/Ruby21/lib/ruby/gems/2.1.0/gems/mysql2-0.2
.6 for inspection.
Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/mys
ql2-0.2.6/gem_make.out
Can anyone help me connect Ruby on rails with MySQL please?