Ruby 升级到7.0后使用mysql2 gem的Gitlab
在将我的Gitlab升级到7.0版后,我的mysql2 gem出现了问题。这是我的错误日志。我可以做些什么来修复它Ruby 升级到7.0后使用mysql2 gem的Gitlab,ruby,gem,gitlab,mysql2,Ruby,Gem,Gitlab,Mysql2,在将我的Gitlab升级到7.0版后,我的mysql2 gem出现了问题。这是我的错误日志。我可以做些什么来修复它 I, [2014-06-24T06:49:07.574760 #18301] INFO -- : Refreshing Gem list /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/connection_specifi
I, [2014-06-24T06:49:07.574760 #18301] INFO -- : Refreshing Gem list
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/connection_specification.rb:190:in `rescue in spec': 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). (Gem::LoadError)
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/connection_specification.rb:187:in `spec'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/connection_handling.rb:50:in `establish_connection'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:129:in `block (2 levels) in <class:Railtie>'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:28:in `block in on_load'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `each'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active_support/lazy_load_hooks.rb:27:in `on_load'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:118:in `block in <class:Railtie>'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
from /usr/local/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
from /usr/local/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
from /usr/local/lib/ruby/2.0.0/tsort.rb:180:in `each'
from /usr/local/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
from /usr/local/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `public_send'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/railtie.rb:194:in `method_missing'
from /home/git/gitlab/config/environment.rb:5:in `<top (required)>'
from config.ru:13:in `require'
from config.ru:13:in `block in <main>'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn.rb:48:in `eval'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn.rb:48:in `block in builder'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/bin/unicorn_rails:139:in `call'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/bin/unicorn_rails:139:in `block in rails_builder'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:722:in `call'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:722:in `build_app!'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:140:in `start'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/bin/unicorn_rails:209:in `<top (required)>'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/bin/unicorn_rails:23:in `load'
from /home/git/gitlab/vendor/bundle/ruby/2.0.0/bin/unicorn_rails:23:in `<main>'
I[2014-06-24T06:49:07.574760#18301]信息--:刷新宝石列表
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/connection\u specification.rb:190:在“rescue in spec”中:为数据库适配器指定了“mysql2”,但未加载gem。将'gem'mysql2'`添加到gem文件中(并确保其版本为ActiveRecord所要求的最低版本)。(Gem::LoadError)
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active\u record/connection\u adapters/connection\u specification.rb:187:in'spec'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active\u record/connection\u handling.rb:50:在“建立连接”中
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:129:in“block(2层)in”
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active\u support/lazy\u load\u hooks.rb:38:in'instance\u eval'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active\u-support/lazy\u-load\u-hooks.rb:38:in'execute\u-hook'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active\u-support/lazy\u-load\u-hooks.rb:28:in'block-in-on\u-load'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active\u support/lazy\u load\u hooks.rb:27:in'each'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activesupport-4.1.1/lib/active\u-support/lazy\u-load\u-hooks.rb:27:in'on\u-load'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/activerecord-4.1.1/lib/active_record/railtie.rb:118:in'block in'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in'instance_exec'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:30:in'run'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:55:“运行中的块初始化器”
from/usr/local/lib/ruby/2.0.0/tsort.rb:150:in'block in tsort_each'
from/usr/local/lib/ruby/2.0.0/tsort.rb:183:in `每个强连接的组件中的块(2个级别)'
from/usr/local/lib/ruby/2.0.0/tsort.rb:219:in'each_强连接的_component_from'
from/usr/local/lib/ruby/2.0.0/tsort.rb:182:in“每个强连接的组件中的块”
from/usr/local/lib/ruby/2.0.0/tsort.rb:180:in'each'
from/usr/local/lib/ruby/2.0.0/tsort.rb:180:in“每个强连接的组件”
from/usr/local/lib/ruby/2.0.0/tsort.rb:148:in'tsort_each'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/initializable.rb:54:in“run_initializers”
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/application.rb:288:in'initialize!'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/railtie.rb:194:in'public_send'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/railties-4.1.1/lib/rails/railtie.rb:194:in'method_missing'
from/home/git/gitlab/config/environment.rb:5:in`'
from config.ru:13:in'require'
from config.ru:13:in'block in'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in'instance_eval'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in'initialize'
from config.ru:1:in'new'
from config.ru:1:in`'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn.rb:48:in'eval'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn.rb:48:in'block in builder'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/bin/unicorn\u rails:139:in'call'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/bin/unicorn\u rails:139:in'block in rails\u builder'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:722:in'call'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_server.rb:722:in'build_app!'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/lib/unicorn/http_-server.rb:140:in'start'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/unicorn-4.6.3/bin/unicorn\u rails:209:in`'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/bin/unicorn\u rails:23:in'load'
from/home/git/gitlab/vendor/bundle/ruby/2.0.0/bin/unicorn\u rails:23:in`'
您必须捆绑安装更新的依赖项
bundle install --deployment --without development test postgres aws
这将安装mysql2 gem和其他。看看他们的精彩文档:感谢您的及时帮助:)