Everything worked fine prior to the update. Using ruby 1.9.3p392 with RVM with rails (3.2.12) Using MySQL 5.7.16 and Nginx and Unicorn
Log shows
LoadError: libmysqlclient.so.18: cannot open shared object file: No such file or directory - /home/bill/apps/xxx/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.16/lib/mysql2/mysql2.so
I tried:
bundle install
Nothing worked. Anyone had that problem after updating ?
mysql2
gem.I had the same thing. Upgraded from Ubuntu 14 to 16 and saw this same error.
To fix it, I just uninstalled the mysql2
gem and reinstalled it using bundler.
Uninstall mysql2
gem:
$ bundle exec gem uninstall mysql2
Reinstall mysql2
gem:
$ bundle install
The reason is because it has to install native extensions when it installs the gem, and a large system change like upgrading the OS 1 or more versions requires rebuilding those native extensions.
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With