title: Can't get mysql2 gem to install. Install can't find mysql.h
body: <p>I am trying to install mysql2:</p>
  
  <pre><code>sudo gem install mysql2 -v '0.2.7' -- --with-mysql-config=/usr/local/Cellar/mysql/5.5.25a/bin/mysql_config
  </code></pre>
  
  <p>I'm getting this error:</p>
  
  <pre><code>ERROR:  Error installing mysql2:
      ERROR: Failed to build gem native extension.
  
         /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb --    with-mysql-config=/usr/local/Cellar/mysql/5.5.25a/bin/mysql_config
  checking for rb_thread_blocking_region()... no
  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.
  </code></pre>
  
  <p>my mysql install is via brew so my mysql.h file is located at:</p>
  
  <pre><code>/usr/local/Cellar/mysql/5.5.25a/bin/mysql_config
  </code></pre>
  
  <p>which is why I have the with-mysql-config flag</p>
  
  <p>The mysql_config file is looking for the mysql.h file here:</p>
  
  <pre><code>$basedir/include/mysql/mysql.h
  </code></pre>
  
  <p>it should be added that I updated my gemfile from </p>
  
  <p>gem 'mysql2</p>
  
  <p>to gem 'mysql2', '0.2.7'</p>
  
  <p>because, I was getting some deprecation warning about the fact that mysql2 0.3.* didn't have active record support. So would either have to upgrade rails to 3.1 or downgrade mysql2. I chose the latter.</p>
  
  <p>Should I edit the mysql_config or is there something else I can do to fix this? Thanks for any help.</p>