此版本的mysql2(0.2.18)与Rails 3.1不兼容
作者:互联网
任何帮助将不胜感激,当我运行“生成模型”命令时,我收到以下消息:
WARNING: This version of mysql2 (0.2.18) isn't compatible with Rails 3.1 as the ActiveRecord adapter was pulled into Rails itself.
WARNING: Please use the 0.3.x (or greater) releases if you plan on using it in Rails >= 3.1.x
有没有办法更新mysql2版本,所以它适用于rails 3.1?或者我可以将rails从3.1降级到3.0?
解决方法:
你需要跑
gem update mysql2
或添加
gem "mysql2", "~> 0.3.11"
到你的Gemfile并运行bundle install
标签:mysql,ruby-on-rails,ruby-on-rails-3,rubygems 来源: https://codeday.me/bug/20190716/1481689.html