Skip to content

Instantly share code, notes, and snippets.

@zhouxiaozhen-github
Last active April 17, 2019 07:15
Show Gist options
  • Save zhouxiaozhen-github/763922ebf8246c2d104150aa9ba1a88b to your computer and use it in GitHub Desktop.
Save zhouxiaozhen-github/763922ebf8246c2d104150aa9ba1a88b to your computer and use it in GitHub Desktop.
mysql 安装之后 bundle 出问题?

MAC 系统中问题解决


mysql client is missing. You may need to 'brew install mysql' or 'port install mysql', and try again.

*** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options.

如果出现找不到配置核心解决方法是下面第二步:

检查方法(on mac)

1 brew services list # 检查mysql是否启动

2 bundle config build.mysql2 --with-mysql-config=/usr/local/Cellar/mysql@5.7/5.7.25/bin/mysql_config # 把版本替换一下

再bundle 应该就可以了 注意本地mysql版本和gem的匹配,有可能不匹配导致问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment