我在Rails项目中使用mysql2
v0.4.4
。我将Mac OS Mojave从v10.14.2
升级到v10.14.0
并运行
brew update
brew upgrade
并尝试重新安装我的捆绑软件,我在安装mysql2
gem时开始出现此错误:
current directory: /Users/hirurg103/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/mysql2-0.4.4/ext/mysql2
/Users/hirurg103/.rbenv/versions/2.4.1/bin/ruby -r ./siteconf20191218-70879-1yhhybm.rb extconf.rb
--with-mysql-config=/usr/local/Cellar/mysql@5.6/5.6.42/bin/mysql_config
checking for ruby/thread.h... yes
checking for rb_thread_call_without_gvl() in ruby/thread.h... yes
checking for rb_thread_blocking_region()... no
checking for rb_wait_for_single_fd()... yes
checking for rb_hash_dup()... yes
checking for rb_intern3()... yes
-----
Cannot find mysql_config at /usr/local/Cellar/mysql@5.6/5.6.42/bin/mysql_config
-----
我查看了/usr/local/Cellar/mysql@5.6
文件夹的内容,似乎其中没有5.6.42
目录:
ls -l /usr/local/Cellar/mysql@5.6/
total 0
drwxr-xr-x 16 hirurg103 staff 512 Dec 18 13:50 5.6.46_2
您是否有解决此问题的想法?谢谢!
答案 0 :(得分:1)
我可以通过使用push notifications
参数运行gem install mysql2 -v 0.4.4
来解决此问题:
--with-mysql-config
此gem install mysql2 -v 0.4.4 -- --with-mysql-config=/usr/local/Cellar/mysql@5.6/5.6.46_2/bin/mysql_config
之后没有错误