08.21.2019

Ruby on Rails: Gem mysql2 loaded error

Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

Simply add mysql2 version into your Gemfile

gem 'mysql2', '~> 0.3.18'

Note: Because newest mysql2 gem does not compatible with Activerecord 

Then update bundle

bundle update mysql

Hope this help
 

Leave a comment