Error installing mysql2: Failed to build gem native extension

后端 未结 27 2730
清酒与你
清酒与你 2020-11-22 08:06

I am having some problems when trying to install mysql2 gem for Rails. When I try to install it by running bundle install or gem install mysq

27条回答
  •  盖世英雄少女心
    2020-11-22 08:55

    I was running into this error on my mac and found that I needed to upgrade from mysql 32bit to mysql 64 bit to get this error to go away. I was running OSX 10.6 on an intel macbook pro with ruby 1.9.2 and rails3.0.0

    I also needed to install xcode in order to get unix utilities like "make" that are required to compile the gem.

    once this was done I was able to run gem install mysql and gem install mysql2 without error.

提交回复
热议问题