In my gemfile I have:
gem \'mysql2\'
My database.yml is as follows:
default: &default adapter: mysql2 database: <
Had same issue but adding source 'https://rubygems.org' to the top of gem file solved issue.
source 'https://rubygems.org'
Steps:
add source 'https://rubygems.org' to your gem file. Comment out mysql2 gem and add gem 'mysql2', '~> 0.3.18' Run bundle install
mysql2 gem
gem 'mysql2', '~> 0.3.18'
bundle install