mysql - OS X Lion with xampp + rails + mysql2 gem -


i'm stuck trying figure out how os x lion xampp installation's mysql work mysql2 gem in rails.

here's i've tried:

  • installed xampp dev kit
  • installed mysql5-server both port , brew. both of i've uninstalled. didn't fix problem.
  • installed mysql5 community edition dmg file. uninstalled didn't fix problem.
  • downloaded 32-bit version of mysql5 community edition tar. extracted folder '/var/mysql'

here's command i'm running try , installed:

gem install mysql2 -- --with-mysql-dir=/var/mysql --with-mysql-include= /var/mysql/include --with-mysql-lib=/var/mysql/lib --with-mysql-config= /applications/xampp/xamppfiles/bin/mysql_config 

i'm @ loss how work. thing can think of i'm somehow not pointing directories correctly. i've tried removing /include/, /mysql/ , /lib/ with-mysql-include, with-mysql-dir , with-mysql-lib configuration options. no luck that. i've tried pointing xampp installation. no luck still.

the error returned is:

error: error installing mysql2: error: failed build gem native extension.  /users/user/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb --with-mysql-dir=/var/mysql --with-mysql-include=/var/mysql/include --with-mysql-lib=/var/mysql --with-mysql-config=/applications/xampp/xamppfiles/bin/mysql_config checking rb_thread_blocking_region()... yes checking rb_wait_for_single_fd()... 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/user/.rvm/rubies/ruby-1.9.3-p194/bin/ruby     --with-mysql-config   gem files remain installed in /users/user/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11 inspection. results logged /users/user/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/gem_make.out 

it'd better not bother stuff xampp provides, , install fresh copy of mysql, , simplify gem command installing mysql2:

brew install mysql gem install mysql2 

you getting errors installing gem after installing mysql through homebrew because of this:

--with-mysql-dir=/var/mysql --with-mysql-include= \ /var/mysql/include --with-mysql-lib=/var/mysql/lib --with-mysql-config= \ /applications/xampp/xamppfiles/bin/mysql_config 

so removing solves problem.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -