2013-02-11 61 views
2

另一個問題。查看Mountain Lion服務器上的文件源時出現Gitlab 500錯誤

如果我試圖在「文件」選項卡中查看文件的內容,則不會顯示任何內容。

一個快速瀏覽一下production.log後,我發現以下幾點:

Completed 500 Internal Server Error in 149ms 

ActionView::Template::Error (Failed to get header.): 
    9: .file_content.code 
    10:  - unless blob.empty? 
    11:  %div{class: user_color_scheme_class} 
    12:   = raw blob.colorize(formatter: :gitlab) 
    13:  - else 
    14:  %p.nothing_here_message Empty file 
    app/models/tree.rb:6:in `colorize' 
    app/views/tree/blob/_text.html.haml:12:in `_app_views_tree_blob__text_html_haml__2117416289591340656_70112288282740' 
    app/views/tree/_blob.html.haml:9:in `_app_views_tree__blob_html_haml__810415587318185235_70112333949220' 
    app/views/tree/_tree.html.haml:19:in `_app_views_tree__tree_html_haml___380187574798250597_70112300103920' 
    app/views/tree/show.js.haml:3:in `_app_views_tree_show_js_haml__4018035125126620215_70112300060420' 

一些谷歌上搜索,我發現這說那是一個Python版本錯誤一些Github的問題之後。

我通過brew install python安裝了python,它應該是正確安裝的python。至少我從控制檯獲得了正確的版本。

Python 2.7.3 (default, Feb 11 2013, 16:34:20) 
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.24)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> 

我只是雙重檢查的bundle exec rake gitlab:check RAILS_ENV=production

我覺得一切都很好,期待一些事情都涉及到OS X,如初始化腳本的東西。

Checking Environment ... 

gitlab user is in gitg group? ... yes 
Has no "-e" in ~gitolite/.profile ... yes 
Git configured for gitlab user? ... yes 
Has python2? ... yes 
python2 is supported version? ... yes 

Checking Environment ... Finished 

Checking Gitolite ... 

Using recommended version ... no 
    Try fixing it: 
    We strongly recommend using the version pointed out in the installation guide. 
    For more information see: 
    doc/install/installation.md in section "Gitolite" 
Repo umask is 0007 in .gitolite.rc? ... yes 
Allow all Git config keys in .gitolite.rc ... yes 
Config directory exists? ... yes 
Config directory owned by gitolite:gitg ... yes 
Config directory access is drwxr-x---? ... yes 
Repo base directory exists? ... yes 
Repo base directory is a symlink? ... no 
Repo base owned by gitolite:gitg? ... yes 
Repo base access is drwxrws---? ... yes 
Can clone gitolite-admin? ... yes 
Can commit to gitolite-admin? ... yes 
post-receive hook exists? ... yes 
post-receive hook up-to-date? ... yes 
post-receive hooks in repos are links: ... 
Some-Customer/Some Repo ... ok 
Some-Customer/Some Repo ... ok 
Some-Customer/Some Repo ... ok 
Git config in repos: ... 
Some-Customer/Some Repo ... ok 
Some-Customer/Some Repo ... ok 
Some-Customer/Some Repo ... ok 

Checking Gitolite ... Finished 

Checking Sidekiq ... 

Running? ... yes 

Checking Sidekiq ... Finished 

Checking GitLab ... 

Database config exists? ... yes 
Database is SQLite ... no 
All migrations up? ... yes 
GitLab config exists? ... yes 
GitLab config outdated? ... no 
Log directory writable? ... yes 
Tmp directory writable? ... yes 
Init script exists? ... no 
    Try fixing it: 
    Install the init script 
    For more information see: 
    doc/install/installation.md in section "Install Init Script" 
    Please fix the error above and rerun the checks. 
Init script up-to-date? ... can't check because of previous errors 
Projects have satellites? ... 
Some-Customer/Some Repo ... yes 
Some-Customer/Some Repo ... yes 
Some-Customer/Some Repo ... yes 

Checking GitLab ... Finished 

回答

0

這可能不僅僅是一個Python版本更多,如 「Issue 2214」 或 「Issue 2272」。

最近的錯誤如Issue 2817仍未解決。

正如在「Issue 2410」所提到的,仔細檢查檢查:

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

請查看上述用於gitlab我的編輯:檢查輸出 – zentur 2013-02-11 18:20:12

相關問題