0

から「redmine_git_hosting」を使用しようとしていますgit://github.com/ericpaulbishop/redmine_git_hosting.git

アクセスしようとすると、次のエラーが発生し/var/log/apache2/error.logます。

/lib/redmine/scm/adapters/git_adapter.rb:26: warning: already initialized constant GIT_BIN

Redmineサイトにアクセスできますが、更新すると次のようになります。

/usr/share/redmine_dev/lib/redmine/scm/adapters/git_adapter.rb:26: warning: already initialized constant GIT_BIN
[ pid=31351 thr=3075225872 file=ext/apache2/Hooks.cpp:817 time=2012-02-15 15:41:08.102 ]: The backend application (process 3677) did not send a valid HTTP response; instead, it sent nothing at all. It is possible that it has crashed; please check whether there are crashing bugs in this application.
[ pid=3677 thr=-609445668 file=utils.rb:176 time=2012-02-15 15:41:08.103 ]: *** Exception NameError in application (uninitialized constant Redmine::Scm::Adapters::CommandFailed) (process 3677, thread #<Thread:0xb75931b8>):

500内部エラーが発生します。

からtop、1つのRubyプロセスが強制終了されたことがわかります。

私の環境は次のとおりです。

  • Ubuntu 11.10
  • PostgreSQL 8.4
  • Apache2.20
  • Ruby 1.8.7
  • Redmine 1.3.0
  • Phusionバージョン3.0.11
  • レール(2.3.14)
  • Rubygems 1.6.2
4

1 に答える 1

0

これは、Chiliproject フォークに対して報告されたバグと同じようです: https://www.chiliproject.org/issues/828

Railsはモジュールをアンロードするため、変更を加えるたびにアプリを再起動する必要はありません。application_controller では、すべての scm リポジトリ クラスが、要求ごとに require_dependency で再度読み込まれます。しかし、これらの scm が依存するモジュール (たとえば git_adapter や abstract_adapter など) は、標準の ruby​​ の require で読み込まれるため、再度読み込まれることはありません。したがって、開発中の初期化されていない一定のエラー。

そこで提案された解決策は

... モジュール内から require を削除し、それらを application_controller に統合します。

  require_dependency 'redmine/scm/adapters/abstract_adapter'
  Redmine::Scm::Base.all.each do |scm|
      require_dependency "repository/#{scm.underscore}" 
      require_dependency "redmine/scm/adapters/#{scm.underscore}_adapter" 
  end
于 2012-02-29T16:32:12.143 に答える