unable to install mysql2 gem

bbalasateesh's Avatar


09 Jul, 2011 07:22 AM

I am trying to install mysql2 gem. I have got following error while installing

C:/Ruby192/bin/ruby.exe extconf.rb
checking for rb_thread_blocking_region()... yes
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:


I have install development kit and then tried this.

Please help me in solving this issue.

Thanks in advance,
Sateesh B.

  1. 1 Posted by Luis Lavena on 09 Jul, 2011 07:16 PM

    Luis Lavena's Avatar


    help.rubygems.org is not a support group about gem installation, even less on proper installation options of gems and it's errors. Is a support site to deal with specific issues of RubyGems website and service itself.

    How to install mysql or mysql2 gem has been deal several times on this forum and over the web on stackoverflow and others.

    I just published recently an article about mysql gem specifically:


    Just change mysql with mysql2, but please note that certain mysql2 versions are specific for Rails 2 or Rails 3, please read the README of mysql2:


  2. Luis Lavena closed this discussion on 09 Jul, 2011 07:16 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac