Gem::LoadError
Specified \'mysql2\' for database adapter, but the gem is not loaded.
Add `gem \'mysql2\'` to your Gemfile
This error occurred while
It worked for me when I specified a mysql2 gem version before the newest one (0.4.0). For some reason there is a problem with Rails 4.2.4 and that gem 0.4.0. So, to solve the problem I just specified the previous gem released: 0.3.20 and it worked fine for me!
gem 'mysql2', '~> 0.3.20'
bundle install
You can check all the gems versions here: https://rubygems.org/gems/mysql2/versions