Skip to content
GitLab
项目 群组 主题 代码片段
  • /
  • 帮助
    • 帮助
    • 支持
    • 社区论坛
    • 提交反馈
  • 登录
  • L large
  • 项目信息
    • 项目信息
    • 动态
    • 标记
    • 成员
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者统计
    • 分支图
    • 比较修订版本
  • 议题 21
    • 议题 21
    • 列表
    • 看板
    • 服务台
    • 里程碑
  • 合并请求 12
    • 合并请求 12
  • CI/CD
    • CI/CD
    • 流水线
    • 作业
    • 产物
    • 计划
  • 部署
    • 部署
    • 环境
    • 发布
  • 软件包与镜像库
    • 软件包与镜像库
    • 软件包库
    • 容器镜像库
    • Terraform 模块
    • 模型实验
  • 监控
    • 监控
    • 事件
  • 分析
    • 分析
    • 价值流
    • CI/CD
    • 仓库
  • Wiki
    • Wiki
  • 代码片段
    • 代码片段
  • 动态
  • 分支图
  • 创建新议题
  • 作业
  • 提交
  • 议题看板
收起侧边栏
  • 王权利
  • large
  • 议题
  • #1774

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.

指派人
分配到
工时统计