欢迎来到cool的博客
7

Music box

Click to Start

点击头像播放音乐
新博客链接

重装了mysql 后,rails s 出现mysql2的bug

dlopen(/Users/wenyuancheng/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/mysql2-0.5.2/lib/mysql2/mysql2.bundle, 9): Library not loaded: @rpath/libmysqlclient.21.dylib (LoadError)
  Referenced from: /Users/wenyuancheng/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/mysql2-0.5.2/lib/mysql2/mysql2.bundle
  Reason: image not found - /Users/wenyuancheng/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/mysql2-0.5.2/lib/mysql2/mysql2.bundle

 

解决方法:

gem pristine mysql2

 

https://stackoverflow.com/questions/33772047/el-capitan-upgrade-library-not-loaded-usr-local-lib-libmysqlclient-18-dylib

返回列表