Haris Ghauri
Haris Ghauri

Reputation: 597

Rails: Specified 'mysql2' for database adapter but the gem is not loaded

apparently there is a thread that addresses this issue . But I have already tried to run those commands given in the solution. I am still getting the same error for some reason.

I run gem install mysql2 -v 0.3.18

followed by bundle install

on my terminal. And than I start the server by typing rails server

Upon opening the localhost:3000. I receive the same 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).

Any help would be much appreciated.

Upvotes: 0

Views: 1680

Answers (1)

K M Rakibul Islam
K M Rakibul Islam

Reputation: 34318

Add the following to your Gemfile:

gem 'mysql2', '~> 0.3.18'

Then run:

bundle install

Upvotes: 4

Related Questions