5

ここの指示に従っています:

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

テストを実行しようとすると:

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

最初のテストではオレンジ色のヘッダーが返され、2 番目のテストでは 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

を実行するsudo -u gitlab -H bundle exec rake sidekiq:startと、次のエラーが表示されます。

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)

トレースを実行すると、次の出力が得られます。

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>'

rb-inotify問題を修正するために手動でインストールしようとしました:

sudo gem install rb-inotify

成功したと表示されていますが、テストはまだ機能していません。お知らせ下さい!ありがとう

4

2 に答える 2

7

その種のコマンド:

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

gitlabのクローンリポジトリで実行する必要があるだけでなく、RAILS_ENV=production正しく機能するためにも必要です。

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

トラブルシューティングページを参照してください。

  • Errorno such file to load -- rb-inotify実行時( #1752rakeに見られるように)
  • Problem:タスクが間違った環境で実行されている
  • SolutionRAILS_ENV=production:コマンドの最後に追加
于 2013-02-06T17:53:44.030 に答える
2

どうやら私はそれを間違った方法で実行していました。このように実行すると、解決しました。

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

チュートリアルを更新する必要があります

于 2013-02-06T17:20:11.903 に答える