Gem::LoadError
Specified 'mysql2' for database adapter, but the gem is not loaded.
Add `gem 'mysql2'` to your Gemfile
This error occurred while loading the following files:
active_record/base
This is the error I get on running rails server.
The mysql2 gem has been added to the Gemfile as well.
I've done bundle install
, and tried restarting the server but still get the error.
I had the same error and this is because Rails 4.1 requires minimum mysql2 version 0.3.13, and maximum compatible with Windows is version 0.3.11.
So I edited file
c:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\activerecord-4.1.1\lib\active_record\connection_adapters\mysql2_adapter.rb
and changed linegem 'mysql2', '~> 0.3.13'
togem 'mysql2', '~> 0.3.11'
, and it works so far.