Can't install mysql2 gem on macOS Sierra

后端 未结 12 2099
抹茶落季
抹茶落季 2020-12-23 13:21

I\'m setting up my development environment in the new macOS Sierra .

First of all, I installed Rbenv, Ruby (2.3.1)

12条回答
  •  执念已碎
    2020-12-23 14:02

    So I ran into this similar issue and for me it turned out to be a wrong ruby version and incompatible MySQL version. I use ruby 2.3 on most of my projects but inherited a 2.1 project. Changing to rvm to use 2.1 got me a little further.

    Then I found this: https://github.com/brianmario/mysql2/issues/603 that said you had to use mysql2 gem version greater than 0.3.17 with MySQL version 5.7

    Updated gem to 0.3.17 and it fired right up. Hope this helps someone.

提交回复
热议问题