mysql2 gem fails to compile with MySQL 5.6.12 on OS X with Homebrew

前端 未结 7 1145
刺人心
刺人心 2020-12-04 23:41

I updated all the packages I installed with Homebrew. MySQL got upgraded to 5.6.12 (from 5.5.27 or so):

$ mysql --version
mysql  Ver 14.14 Distrib 5.6.12, fo         


        
相关标签:
7条回答
  • 2020-12-05 00:47

    Much newer versions of MySQL are available, but for an older project install on Mac OS X Mojave, I still needed to run MySQL 5.6 and link against it in a Rails 5 app.

    I configured bundler, then installed the bundle and was good to go.

    $> brew install mysql@5.6
    $> bundle config build.mysql2 --with-mysql-config=/usr/local/Cellar/mysql\@5.6/5.6.42/bin/mysql_config
    $> bundle install
    

    Note that you'll need to update the MySQL release version in the path.

    0 讨论(0)
提交回复
热议问题