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

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

In my gemfile I have:

gem \'mysql2\'

My database.yml is as follows:

default: &default
  adapter: mysql2
  database: <         


        
9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 06:38

    try this:

    bundle update mysql2
    

    this command will update your 'mysql2' gem to the latest version (should be 0.3.17 or higher) and start your rails server.

提交回复
热议问题