title: Segmentation fault bug while trying to run Rails with Mysql
body: <p>I am a newbie to RoR. Just trying some hands-on.</p>
  
  <p>I’ve done the following things:</p>
  
  <p>Installed Ruby 2.0.0-p481 (x64) (set env paths)</p>
  
  <p>Installed DevKit-mingw64-64-4.7.2-20130224-1432-sfx</p>
  
  <p>Installed MySQL Server 5.6.19 (set env paths)</p>
  
  <p>gem install mysql2 --no-rdoc --no-ri -- '--with-mysql-lib="C:\Program Files\MySQL\MySQL Server 5.6\lib" --with-mysql-include="C:\Program Files\MySQL\MySQL Server 5.6\include"' (Success)</p>
  
  <p>Then I created a test.rb file with the following code just to test mysql</p>
  
  <pre><code>require 'mysql2'
  
  client = Mysql2::Client.new(host: 'localhost', username: 'root', password: '')
  
  sql = 'select NOW() as timestamp'
  
  result = client.query(sql)
  
  result.each do |row|
    puts row['timestamp']
  end
  </code></pre>
  
  <p>Then I issued following command:</p>
  
  <pre><code>ruby test.rb
  </code></pre>
  
  <p>This is a glimpse of error:</p>
  
  <p>C:/Ruby200-x64/lib/ruby/gems/2.0.0/extensions/x64-mingw32/2.0.0/mysql2-0.3.16/mysql2/mysql2.so: [BUG] Segmentation fault ruby 2.0.0p481 (2014-05-08) [x64-mingw32]</p>
  
  <p>After it, there are more than 500+ lines or error. I’m using Windows 8.1(x64). </p>
  
  <p>Someone can say that this question is a duplicate and has been asked several times and I accept it but I found no solution for it anywhere.</p>