Can't install mysql2 gem on macOS Sierra

后端 未结 12 2104
抹茶落季
抹茶落季 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 13:58

    I am here to share my fix, since the other answers didn't work.

    For my environment, I need MySQL 5.6 so I had to use:

    brew install mysql56 instead of brew install mysql

    Bundle installing the mysql2 gem kept failing, until:

    brew link mysql56

    I also ran afterwards:

    mysql.server start

    The last step might be unnecessary, but just in case.

提交回复
热议问题