gpt4 book ai didi

ruby - 升级到 7.0 后带有 mysql2 gem 的 Gitlab

转载 作者:太空宇宙 更新时间:2023-11-03 18:17:08 25 4
gpt4 key购买 nike

将我的 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_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>'

最佳答案

您必须捆绑安装更新的依赖项。

bundle install --deployment --without development test postgres aws

这将安装 mysql2 gem 和其他的。看看他们很棒的文档:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md

关于ruby - 升级到 7.0 后带有 mysql2 gem 的 Gitlab,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24380649/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com