2012-02-15 6 views
0

나는 git://github.com/ericpaulbishop/redmine_git_hosting.git왜 루비가 부서 지나요? 내가 얻을 새로 고침 경우</p> <pre><code>/lib/redmine/scm/adapters/git_adapter.rb:26: warning: already initialized constant GIT_BIN </code></pre> <p>내가하지만 그때 레드 마인 사이트에 액세스 할 수 있습니다 : 나는 <code>/var/log/apache2/error.log</code>에 오류가 액세스하려고하면

에서 "redmine_git_hosting"를 사용하는 것을 시도하고있다 :

/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 프로세스가 삭제 된 것을 볼 수 있습니다.

내 환경은 다음과 같습니다

  • 우분투 11.10
  • PostgreSQL의 8.4
  • Apache2.20
  • 루비 1.8.7
  • 레드 마인 1.3.0
  • Phusion 버전 3.0.11
  • 레일 (2.3.14)
  • 젬 1.6.2 이것은 Chiliproject 포크에 대해보고 이것과 같은 버그가 나타납니다
+0

:

는 제안 된 솔루션은이 모듈 내에서 필요로 제거하고 application_controller에 통합 ...

에 있었다 노력하다; 우리는 소스 코드를 볼 필요가있다. –

+0

경고는 문제의 일부일 수도 있고 아닐 수도 있습니다. 단지 경고 일뿐입니다. 더 큰 문제는 다음과 같이 나타납니다 : *** 예외 NameError in Application (초기화되지 않은 상수 Redmine :: Scm :: Adapters :: CommandFailed) (프로세스 3677, 스레드 # <스레드 : 0xb75931b8>) : – jefflunt

답변

0

: 두 번째에서 (https://www.chiliproject.org/issues/828

이는 첫 번째 요청 후, 개발 모드에서 일어나는 것 같다 요청시), 레일이 모듈을 언로드하므로 변경 작업을 할 때마다 앱을 다시 시작할 필요가 없습니다. application_controller에서 모든 scm 저장소 클래스는 모든 요청마다 require_dependency로 다시로드됩니다. 그러나 이러한 scm이 의존하는 모듈 (예 : git_adapter 및 abstract_adapter)은 표준 루비 요구 사항으로로드되기 때문에 다시로드되지 않습니다. 따라서 초기화되지 않은 상수 오류가 발생합니다. 당신은 충분히 우리에게 주신하지 않은

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