Need help getting mysql2 installed. I searched all over and have come to frustration. I'm new in centos and keep hitting certain roadblocks. I've managed to get past most, but i'm looking for help. I get the following running gem install mysql2
[root bin]# gem install mysql2
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for ruby/thread.h... no
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... no
checking for rb_hash_dup()... no
checking for rb_intern3()... no
-----
Using mysql_config at /usr/bin/mysql_config
-----
checking for mysql.h... no
checking for mysql/mysql.h... no
-----
mysql.h is missing. please check your installation of mysql and try again.
-----
*** 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=/usr/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
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mysql2-0.3.15 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mysql2-0.3.15/ext/mysql2/gem_make.out
When i run rpm -qa | grep mysql i have the following
[root bin]# rpm -qa | grep mysql
mysql-server-5.1.73-3.el6_5.x86_64
mysql-libs-5.1.73-3.el6_5.x86_64
mysql-devel-5.1.73-3.el6_5.x86_64
mysql-5.1.73-3.el6_5.x86_64
most other solutions say to install mysql-devel, but i already have that installed. looking i can see mysql.h in /usr/include/mysql. Most others are also missing the line mysql_config at /usr/bin/mysql_config.
Does anyone have any ides. Thanks!
Edit: Adding a few more details Centos 6.5 Fresh install ( Puppet master from puppet labs repo,then added epel, then theforeman installed, Trying to migrate sqlite to mysql db, but need mysql2 gem installed) Mysql 5.1