本文介绍了GitLab sidekiq失败测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循这里的指示:



当我尝试运行测试时:

  sudo -u gitlab -H bundle exec rake gitlab:env:info RAILS_ENV = production 
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV = production

第一个测试会返回橙色标题,第二个测试会显示Sidekiq的错误:

 检查Sidekiq。 .. 

跑步? ... no
尝试修复它:
sudo -u gitlab -H bundle exec rake sidekiq:start
有关更多信息,请参阅:
doc / install / installation.md 安装初始脚本
请参阅log / sidekiq.log查看可能的错误
请修复上述错误并重新运行检查。
检查Sidekiq ...完成

当我运行 sudo - u gitlab -H bundle exec rake sidekiq:start ,我得到以下错误:

  rake aborted aborted ! 
无法加载这样的文件 - rb-inotify
/home/gitlab/gitlab/config/application.rb:9:in`< top(required)>'
/ home / gitlab / gitlab / Rakefile:5:在'require'
/ home / gitlab / gitlab / Rakefile:5:在< top(required)>'
--trace)

当我运行跟踪时,我得到以下输出:

  rake中止! 
无法加载这样的文件 - rb-inotify
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:68: in'require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in`block(2 levels)in require '
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in`each'
/ usr / local /lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in`block in require'
/ usr / local / lib / ruby​​ / gems / 1.9.1 / gems / bundler-1.2.3 / lib / bundler / runtime.rb:55:在`each'中
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2 .3 / lib / bundler / runtime.rb:55:在'require'中
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler.rb: 128:在`require'
/home/gitlab/gitlab/config/application.rb:9:in`< top(required)>'
/ home / gitlab / gitlab / Rakefile:5 :在`require'
/ home / gitlab / gitlab / Rakefile:5:在< top(required)>'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9。 1 /宝石/耙10.0.3 / LIB / rake / rake_module.rb:25:`load'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25 :在`load_rakefile'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:583:in`raw_load_rakefile'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:89:in`block in load_rakefile'
/ home / gitlab / gitlab / vendor / bundle / ruby​​ / 1.9.1 / gems / rake-10.0.3 / lib / rake / application.rb:160:在`standard_exception_handling'
/ home / gitlab / gitlab / vendor / bundle /ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:88:in`load_rakefile'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/ gems / rake-10.0.3 / lib / rake / application.rb:72:在`block in run'中
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0 .3 / lib / rake / application.rb:160:在`standard_exception_handling'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/ application.rb:70:在`run'
/ home / g itlab / gitlab / vendor / bundle / ruby​​ / 1.9.1 / gems / rake-10.0.3 / bin / rake:33:在< top(required)>'
/ home / gitlab / gitlab / vendor / bundle / ruby​​ / 1.9.1 / bin / rake:23:in`load'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in`< ;主要>'

我已经尝试手动安装 rb-inotify 来解决问题:

  sudo gem install rb-inotify 

它说成功了,但测试仍然不起作用!请指教!谢谢

解决方案

那种命令:

  sudo -u gitlab -H bundle exec rake sidekiq:start 

不仅需要在gitlab克隆的repo中运行,还需要一个 RAILS_ENV = production 才能正常运行:

  sudo -u gitlab -H bundle exec rake sidekiq:start RAILS_ENV = production 

请参阅


I am following the instructions here:

https://github.com/gitlabhq/gitlabhq/blob/4-1-stable/doc/install/databases.md

When I try to run the tests:

sudo -u gitlab -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production

The first test returns orange headers, the second test shows an error with Sidekiq:

Checking Sidekiq ...

Running? ... no
  Try fixing it:
  sudo -u gitlab -H bundle exec rake sidekiq:start
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  see log/sidekiq.log for possible errors
  Please fix the error above and rerun the checks.
Checking Sidekiq ... Finished

When I run sudo -u gitlab -H bundle exec rake sidekiq:start, I get the following error:

rake aborted!
cannot load such file -- rb-inotify
/home/gitlab/gitlab/config/application.rb:9:in `<top (required)>'
/home/gitlab/gitlab/Rakefile:5:in `require'
/home/gitlab/gitlab/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

When I run trace, I get the following output:

rake aborted!
cannot load such file -- rb-inotify
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:68:in `block (2     levels) in require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:66:in `block in require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `each'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler/runtime.rb:55:in `require'
/usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
/home/gitlab/gitlab/config/application.rb:9:in `<top (required)>'
/home/gitlab/gitlab/Rakefile:5:in `require'
/home/gitlab/gitlab/Rakefile:5:in `<top (required)>'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:583:in `raw_load_rakefile'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:89:in `block in load_rakefile'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:88:in `load_rakefile'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:72:in `block in run'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:160:in `standard_exception_handling'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/lib/rake/application.rb:70:in `run'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/rake-10.0.3/bin/rake:33:in `<top (required)>'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `load'
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/bin/rake:23:in `<main>'

I have already attempted to manually install rb-inotify to correct the issue:

sudo gem install rb-inotify

It says that it is successful, but the tests still do not work! Please advise! Thanks

解决方案

That kind of command:

 sudo -u gitlab -H bundle exec rake sidekiq:start

not only needs to be run in the gitlab cloned repo, but also need a RAILS_ENV=production to function properly:

 sudo -u gitlab -H bundle exec rake sidekiq:start RAILS_ENV=production

See the troubleshooting page:

这篇关于GitLab sidekiq失败测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 08:03