问题
I did bundle install
and the mysql2 gem was updated from 0.4.10 to 0.5.0.
After this anything involving ActiveRecord blows up with the error in the title.
回答1:
ActiveRecord only works with specific versions of mysql2.
In your Gemfile add:
gem 'mysql2', '< 0.5'
and bundle install
.
I would also recommend adding a comment pointing to this URL so you know why the gem is pinned.
来源:https://stackoverflow.com/questions/49407254/gemloaderror-cant-activate-mysql2-0-5-0-3-18-already-activated-mysq