file content not showing (500 error)
Created by: ZhangBowen
Hi~ I install GitLab 5.1 and after I create a repo I can not browse the file content.If the file is not empty,the content body changed into space,otherwise it showed "The file is empty". Strangely, I can browse commits normally. I found #3479 (closed) and I reinstalled the gem and upgraded git to 1.8.3.rc1,but they did not take effects. The log says that:
Started GET "/root/fengjin/tree/master/abc?_=1367843074552" for 127.0.0.1 at 2013-05-06 20:24:34 +0800
Started GET "/assets/ajax_loader.gif" for 127.0.0.1 at 2013-05-06 20:24:34 +0800
Served asset /ajax_loader.gif - 304 Not Modified (0ms)
Processing by TreeController#show as JS
Parameters: {"_"=>"1367843074552", "project_id"=>"root/fengjin", "id"=>"master/abc"}
Rendered tree/_blob_actions.html.haml (9.6ms)
Rendered tree/blob/_text.html.haml (117.3ms)
Rendered tree/_blob.html.haml (128.4ms)
Rendered tree/_tree.html.haml (130.3ms)
Rendered tree/show.js.haml (130.7ms)
Completed 500 Internal Server Error in 170ms
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__2739792558108903809_288111340'
app/views/tree/_blob.html.haml:9:in `_app_views_tree__blob_html_haml___3291139682933160768_285870460'
app/views/tree/_tree.html.haml:16:in `_app_views_tree__tree_html_haml__456673824655598839_286704040'
app/views/tree/show.js.haml:3:in `_app_views_tree_show_js_haml___2544393733440767398_283343400'