Error 500 while trying to see source file
Created by: veprbl
After upgrade to 3.0.1 from 2.6 everything seems to work fine except viewing source files. For example, when I try to open ruby file from gitlab repo I get following:
Started GET "/gitlab/tree/master/app/models/ability.rb" for 123.117.161.175 at 2012-10-24 04:32:40 +0400
Processing by TreeController#show as HTML
Parameters: {"project_id"=>"gitlab", "id"=>"master/app/models/ability.rb"}
Rendered shared/_ref_switcher.html.haml (2.3ms)
Rendered tree/_head.html.haml (4.3ms)
Rendered tree/_blob_actions.html.haml (60.2ms)
Rendered tree/blob/_text.html.haml (316.8ms)
Rendered tree/_blob.html.haml (403.8ms)
Rendered tree/_tree.html.haml (407.1ms)
Rendered tree/show.html.haml within layouts/project_resource (412.3ms)
Completed 500 Internal Server Error in 483ms
ActionView::Template::Error (Failed to get header.):
10: - unless blob.empty?
11: %div{class: current_user.dark_scheme ? "black" : "white"}
12: = preserve do
13: = raw blob.colorize(options: { linenos: 'True'})
14: - else
15: %h4.nothing_here_message Empty file
app/models/tree.rb:5:in `colorize'
app/views/tree/blob/_text.html.haml:13:in `block in _app_views_tree_blob__text_html_haml___286653145_97900110'
app/views/tree/blob/_text.html.haml:12:in `_app_views_tree_blob__text_html_haml___286653145_97900110'
app/views/tree/_blob.html.haml:9:in `_app_views_tree__blob_html_haml__842558020_96336160'
app/views/tree/_tree.html.haml:15:in `_app_views_tree__tree_html_haml___92957615_96221490'
app/views/tree/show.html.haml:3:in `_app_views_tree_show_html_haml__1679662_93786340'
app/controllers/tree_controller.rb:17:in `show'
This only happens for source code files. Markdown files are showing great.
I guess this have something to do with "linguist" or ruby pygments wrapper.