Hi Hassan, Here's the same reult's output with --verbose. I tried it without and with the --with-mysql-config parameter; Dave
davids-MacBook-Pro:sailing_oli_bk31mar2013pg bone_david$ gem install mysql2 --verbose -- --with-mysql-config=/usr/local/mysql/bin/mysql_config GET http://rubygems.org/latest_specs.4.8.gz 302 Moved Temporarily GET http://production.s3.rubygems.org/latest_specs.4.8.gz 304 Not Modified GET http://rubygems.org/latest_specs.4.8.gz 302 Moved Temporarily GET http://production.s3.rubygems.org/latest_specs.4.8.gz 304 Not Modified Installing gem mysql2-0.3.11 /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/.gitignore /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/.rspec /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/.rvmrc /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/.travis.yml /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/CHANGELOG.md /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/Gemfile /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/MIT-LICENSE /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/README.md /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/Rakefile /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/benchmark/active_record.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/benchmark/active_record_threaded.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/benchmark/allocations.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/benchmark/escape.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/benchmark/query_with_mysql_casting.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/benchmark/query_without_mysql_casting.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/benchmark/sequel.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/benchmark/setup_db.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/benchmark/threaded.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/examples/eventmachine.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/examples/threaded.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/client.c /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/client.h /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/extconf.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/mysql2_ext.c /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/mysql2_ext.h /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/result.c /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/result.h /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/wait_for_single_fd.h /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2/client.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2/em.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2/error.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2/result.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/lib/mysql2/version.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/mysql2.gemspec /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/spec/em/em_spec.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/spec/mysql2/client_spec.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/spec/mysql2/error_spec.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/spec/mysql2/result_spec.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/spec/rcov.opts /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/spec/spec_helper.rb /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/tasks/benchmarks.rake /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/tasks/compile.rake /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/tasks/rspec.rake /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/tasks/vendor_mysql.rake Building native extensions. This could take a while... ERROR: Error installing mysql2: ERROR: Failed to build gem native extension. /Users/bone_david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb --with-mysql-config=/usr/local/mysql/bin/mysql_config checking for rb_thread_blocking_region()... yes checking for rb_wait_for_single_fd()... yes 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=/Users/bone_david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby --with-mysql-config Gem files will remain installed in /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11 for inspection. Results logged to /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/gem_make.out davids-MacBook-Pro:sailing_oli_bk31mar2013pg bone_david$ On Sunday, May 12, 2013 1:34:36 PM UTC-4, dave wrote: > > Hi Group, > I've got mysql database installed and the server running on a Mac Pro with > latest mountain lion setup 10.8.3. > I'm able to use mysql tools like mysql, mysqladmin to converse with it. :} > > I use RVM's scripts to fetch gems. > I've visited RVM's website but their advise to get "mysql gem loaded" does > the same thing *as below aborted output*! > I'm not sure that this website is being maintained anymore as their > copyright notice is 2011. > > What/how suggestions appreciated to get this mysql2 gem installed so that > i can use rails/ruby against this database? > > My ROR config: > ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin12.2.0] > Rails 3.2.12 > RVM gem managed > > So far Macport seems to work to install mysql and gen/install the mysql2 > gem. I've not tried this gem yet as i'm still using RVM. > I don't believe this is the latest mysql release by Macport. > It goes against Mysql's website advise to install it by DMG route for Mac > which I did with the latest stable 64 bit libraries/server. > > Thanks for your help in trying to resolve this issue. > Dave > > > *The aborted output from gem install mysql2.* > *Both ways attempted: gem install mysql2 and with the option > --with-mysql-config=/usr/local/mysql/bin/mysql_config* > > gem install mysql2 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config > Building native extensions. This could take a while... > ERROR: Error installing mysql2: > ERROR: Failed to build gem native extension. > > /Users/bone_david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb > --with-mysql-config=/usr/local/mysql/bin/mysql_config > checking for rb_thread_blocking_region()... yes > checking for rb_wait_for_single_fd()... yes > 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=/Users/bone_david/.rvm/rubies/ruby-1.9.3-p194/bin/ruby > --with-mysql-config > > > Gem files will remain installed in > /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11 for > inspection. > Results logged to > /Users/bone_david/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.3.11/ext/mysql2/gem_make.out > > *To show mysql_config file exists:* > ls -al /usr/local/mysql/bin/mysql_config > -rwxr-xr-x 1 root wheel 6382 5 Apr 09:53 > /usr/local/mysql/bin/mysql_config > > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/zShAUeVKhCAJ. For more options, visit https://groups.google.com/groups/opt_out.