Could not find gem 'mysql2 (>= 0) ruby' in the gems available on this machine -
this question has answer here:
- how install mysql gem on mac os x 8 answers
installed rails on computer, made under instruction -https://coderwall.com/p/auvm9g
when installing new project - rails new my_project -d mysql
installing mysql2 (0.3.13) gem::installer::extensionbuilderror: error: failed build gem native extension. /users/albert/.rvm/rubies/ruby-1.9.3-head/bin/ruby extconf.rb checking rb_thread_blocking_region()... yes checking rb_wait_for_single_fd()... yes checking rb_hash_dup()... yes checking rb_intern3()... yes checking mysql.h... no checking mysql/mysql.h... no ----- mysql.h missing. please check installation of mysql , try again. ----- *** 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 --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=/users/albert/.rvm/rubies/ruby-1.9.3-head/bin/ruby --with-mysql-config --without-mysql-config gem files remain installed in /users/albert/.rvm/gems/ruby-1.9.3-head@kyrgyz-tours/gems/mysql2-0.3.13 inspection. results logged /users/albert/.rvm/gems/ruby-1.9.3-head@kyrgyz-tours/gems/mysql2-0.3.13/ext/mysql2/gem_make.out error occurred while installing mysql2 (0.3.13), , bundler cannot continue. make sure `gem install mysql2 -v '0.3.13'` succeeds before bundling.
thank all! gem mysql2 installed :)
your error seems not have mysql installed in system please install mysql-server
, mysql-client
, necessary libraries eg: libmysql-dev...........
----- mysql.h missing. please check installation of mysql , try again. -----
you can follow http://ariejan.net/2007/12/12/how-to-install-mysql-on-ubuntudebian/
if mac os http://www.randomactsofsentience.com/2013/05/gem-install-mysql2-missing-mysqlh-on-os.html
also
using package manager homebrew or macports makes straight-forward fix this. binary distribution of mysql direct oracle , 1 bundled os x not have development headers, of mysql.h 1 of them.
and
brew install mysql
Comments
Post a Comment