0

Possible Duplicate:
Ruby gem mysql2 install error

There is mysql2 0.2.6 installed with rails 3.1.0, mysql 5.1.54 and win7. Need to update it to mysql2 0.3.7. However gem update mysql2 generated error as below. Copied libmysql.dll in to ruby/bin and it did not help.

$ gem update mysql2
Updating installed gems
Updating mysql2
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
        ERROR: Failed to build gem native extension.

        c:/Ruby192/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... no
checking 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 options:
        --with-opt-dir

Any thoughts? Thanks.

Community
  • 1
  • 1
user938363
  • 8,932
  • 26
  • 111
  • 244
  • Did you try the steps mentioned here: http://rorguide.blogspot.com/2011/03/installing-mysql2-gem-on-ruby-192-and.html and http://stackoverflow.com/questions/3655923/ruby-gem-mysql2-install-error – emrass Nov 11 '11 at 18:54
  • make the following change in gemfile solve the problem: gem mysql2 '>=0.2.6' It was gem mysql2 '>=0.3.7' 'bundle install' installed the mysql2 0.2.6 without error. rspec works now. – user938363 Nov 11 '11 at 19:50
  • @user938363, please make an answer out of your last comment, since it solved the problem for you. – Brock Adams Nov 13 '11 at 04:30

0 Answers0