`

gem_file添加了msql2 bundle install rails s都能成功,但是railsc会报下面的错误

    博客分类:
  • sql
 
阅读更多
~/gitlab-ci$ bundle exec rake db:migrate RAILS_ENV=production
rake aborted!
Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
rm Gemfile.lock重新bundle install, 以及直接bundle install mysql2,或者在gemfile里面添加了 gem 'mysql2','0.4.0' 都ok


改成gem 'mysql2', '~> 0.3.18' ,版本兼容的问题,0.3.0都不行。艹
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics