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

后端 未结 14 2590
醉酒成梦
醉酒成梦 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:49

    I'm brand spanking new to Ruby on Rails and websites but hears what worked for me.

    I had to change my gemfile, gem 'mysql2' to gem 'mysql2', '~> 0.3.13' then in rails i typed bundle install then i tried rails s and got errors so then i tried bundle update mysql2 then in rails typed rails s, and it worked

提交回复
热议问题