tag:help.rubygems.org,2010-01-19:/discussions/questions/5857-cannot-install-mysql2-gemRubyGems.org: Discussion 2015-08-17T19:38:56Ztag:help.rubygems.org,2010-01-19:Comment/302670072013-11-29T16:56:31Z2013-11-29T16:56:31Zcannot install mysql2 gem<div><p>You need mysql headers and libraries to properly compile the
gem.</p>
<p>Please see the following post about compilation of mysql (or
mysql2) gems:</p>
<p><a href=
"http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-x64-and-using-ruby-with-it/">
http://blog.mmediasys.com/2011/07/07/installing-mysql-on-windows-7-...</a></p>
<p>Sorry for top posting. Sent from mobile.</p></div>Luis Lavenatag:help.rubygems.org,2010-01-19:Comment/302670072014-07-26T21:18:19Z2014-07-26T21:18:21Zcannot install mysql2 gem<div><p>I managed to succeed at this out of pure luck, but after an hour
of hell I feel like I should share my solution, obviously very
shortened but a lot of the steps I think you can figure out how to
do on your own.</p>
<p>My machine is Win 7 64bit. I was able to install version
0.3.16</p>
<ol>
<li>Install ruby version 2.0.0p481 (?)<br></li>
<li>Devkit blah blah<br></li>
<li>Install rails version 4.0.0<br></li>
<li>Download Mysql Connector C 64 bit zip file, put in C drive as
mysqlc<br></li>
<li>Take DLL from that bin, put it in lib of ruby<br></li>
<li>gem install mysql2 -- -- with-mysql-dir="C:\mysqlc"</li>
</ol></div>RGtag:help.rubygems.org,2010-01-19:Comment/302670072014-07-28T23:12:37Z2014-07-28T23:12:37Zcannot install mysql2 gem<div><p>Hello,</p>
<p>There are known issues with x64 version of MySQL Connector/C and
GCC<br>
compiler (RubyInstaller is built with GCC).</p>
<p><a href=
"https://bugs.ruby-lang.org/issues/8591">https://bugs.ruby-lang.org/issues/8591</a></p></div>Luis Lavenatag:help.rubygems.org,2010-01-19:Comment/302670072014-09-11T21:25:40Z2014-09-11T21:25:43Zcannot install mysql2 gem<div><p>The solution is here:</p>
<p><a href=
"https://medium.com/@frontlineutils/installing-the-mysql2-rubyonrails-gem-on-windows-7-8-a028f44d87f3">
https://medium.com/@frontlineutils/installing-the-mysql2-rubyonrail...</a></p></div>Dmitrytag:help.rubygems.org,2010-01-19:Comment/302670072014-09-12T00:44:11Z2014-09-12T00:44:11Zcannot install mysql2 gem<div><p>Dmitry, the post do not mention that using bundled lib from
connector<br>
package will segfault, as mentioned in the ruby bug report.</p>
<p>Sorry for top posting. Sent from mobile.</p></div>Luis Lavena