Gem::LoadError for mysql2 gem, but it's already in Gemfile

后端 未结 14 2650
醉酒成梦
醉酒成梦 2020-12-02 08:35
Gem::LoadError
Specified \'mysql2\' for database adapter, but the gem is not loaded.
Add `gem \'mysql2\'` to your Gemfile

This error occurred while

14条回答
  •  醉话见心
    2020-12-02 08:52

    Being Beginner to the ruby i could not figure out the line gem 'mysql2', '~> 0.3.18'

    it simply means go to your rails project folder and then there is line for mysql2 it will be like 0.4* so you can change it to gem 'mysql2', '~> 0.3.18'

    and as we have new definition, we have to rebuild the dependency so to do that simple command as explained on the top bundle install

提交回复
热议问题