Rails 4 - Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded

前端 未结 9 922
一整个雨季
一整个雨季 2020-12-02 06:13

In my gemfile I have:

gem \'mysql2\'

My database.yml is as follows:

default: &default
  adapter: mysql2
  database: <         


        
9条回答
  •  猫巷女王i
    2020-12-02 06:34

    If you are able to upgrade your rails version, then change your Gemfile to this and it will solve the problem without downgrading the mysql2 gem version:

    gem 'rails', '4.2.6'
    

提交回复
热议问题