gitlab ActionView::Template::Error (undefined method `[]' for nil:NilClass): 500错误
Started GET "/mygroup/myproject/tree/master/MyDirectory" for 127.0.0.1 at 2014-10-22 22:42:42 +0200
Processing by Projects::TreeController#show as HTML
Parameters: {"project_id"=>"mygroup/myproject", "id"=>"master/MyDirectory"}
Completed 500 Internal Server Error in 373ms
ActionView::Template::Error (undefined method `[]' for nil:NilClass):
1: - tree, commit = submodule_links(submodule_item)
2: %tr{ class: "tree-item" }
3: %td.tree-item-file-name
4: %i.fa.fa-archive
app/models/repository.rb:162:in `method_missing'
app/models/repository.rb:228:in `submodule_url_for'
app/helpers/submodule_helper.rb:6:in `submodule_links'
app/views/projects/tree/_submodule_item.html.haml:1:in `_app_views_projects_tree__submodule_item_html_haml__1960578592168380494_48290660'
app/helpers/tree_helper.rb:19:in `render_tree'
app/views/projects/tree/_tree.html.haml:42:in `_app_views_projects_tree__tree_html_haml__985986129427416040_29680420'
app/views/projects/tree/show.html.haml:9:in `_app_views_projects_tree_show_html_haml___3955057514203210948_31577660'
app/controllers/projects/tree_controller.rb:13:in `show'
这个问题让我聪明的领导给解决了
这个问题想开了,不难解决。就是.gitmodules文件中submodule项目,有一个已经不用了,删除了路径,但是在submodule中还存在,删除了,这个问题就解决了
我也参考了https://gitlab.com/gitlab-org/gitlab-ce/issues/714
由这个引发的思考和反思(为什么我一天没有反思,领导一个多小时就解决了):
1,注意前后对比,之前的版本是正常的,这个版本是不正常的,我没有做到前后对比,虽然从网上得到的结果是.gitmodules的问题,但是我没有确认一定是这个文件的问题
2,没有细心的对比不同,文件中,只有其中的一个文件没有,没有发现这个点。
3,对gitlab不了解,原来没有用过这个服务,对这个服务的应用和使用了解的不清楚。我只是从gitlab文件里边直接更改.gitmodules,但是当问题解决了的时候,我git clone 发现,.gitmodules文件没有修改过。而重新提交的文件就可以。
4,从服务源代码定位问题方向(当时我也看了,但是一看看不懂,就放弃了),总结起来还是对日志出现的报错,研究不深。
总结:
1,以后遇到问题要注意bug前后对比,找出差异
2,细心查找不同,注意观察
3,对出现问题的服务,多加了解、熟悉、使用
gitlab ActionView::Template::Error (undefined method `[]' for nil:NilClass): 500错误的更多相关文章
- FATAL: ActionView::Template::Error (application.css isn't precompiled):
iwangzheng.com tty:[0] jobs:[0] cwd:[/opt/logs/m]13:02 [root@a02.cmsapi$ tail thin\ server\ \(0.0.0. ...
- CentOS 7安装Gitlab时报错:undefined method `downcase' for nil:NilClass
说明:其实这事怪我,我把系统的某些配置改了. 首先分析这个错误出现的位置在这个文件: /opt/gitlab/embedded/cookbooks/cache/cookbooks/package/li ...
- C++ template error: undefined reference to XXX
一般来说,写C++程序时推荐“类的声明和实现分离”,也就是说一个类的声明放在example.h文件中,而这个类的实现放在example.cpp文件中,这样方便管理,条理清晰. 但是如果类的声明用到了模 ...
- Use “error_messages” in Rails 3.2? (raises “undefined method” error)
I am getting the following error in my Rails 3.2 functional tests: ActionView::Template::Error: unde ...
- "undefined method `root' for nil:NilClass" error when using "pod install" 解决办法
如果pod undate 的时候报错"undefined method `root' for nil:NilClass" error when using "pod in ...
- 安装redis cluster时:undefined method `invoke_with_build_args' for nil:NilClass
gem install -l redis-3.3.3.gem ERROR: Loading command: install (LoadError) cannot load such file -- ...
- undefined method `environment' for nil:NilClass when importing Bootstrap into rails
今天做项目时往Gemfile里加了各gem, 然后bundle update了一下, 然后悲剧了,出现了undefined method `environment' for nil:NilClass ...
- ERROR - Undefined placeholders found in template:
今天发现了一个BUG,在引用其他的包的的时候报错: ERROR - Undefined placeholders found in template: - Template: META-INF/aut ...
- CI框架 Fatal error: Call to undefined method CI_DB::CI_DB() in D:\xinqing\web\CodeIgniter\database\drivers\odbc\odbc_driver.php on line 53
Fatal error: Call to undefined method CI_DB::CI_DB() in D:\xinqing\web\CodeIgniter\database\drivers\ ...
随机推荐
- 100个常用的linux命令
1,echo “aa” > test.txt 和 echo “bb” >> test.txt //>将原文件清空,并且内容写入到文件中,>>将内容放到文件的尾部 2 ...
- 安卓问题http://blog.csdn.net/xb12369/article/details/50510302
- 【三支火把】---C语言const用法总结
C语言关键字const相信对于不少C语言新手是既陌生又熟悉的,好像经常见,但是却不知道为何用,怎么用?学习至此,总结一下const的用法,使用程序来帮助你理解该关键字,希望能帮到像我一样的新手. 我看 ...
- POJ 1179 IOI1998 Polygon
Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 5472 Accepted: 2334 Description Polyg ...
- 算法之旅,直奔<algorithm>之十三 fill
fill(vs2010) 引言 这是我学习总结<algorithm>的第十三篇,fill是一个很好的初始化工具.大学挺好,好好珍惜... 作用 fill 的作用是 给容器里一个指定的范围 ...
- cookie的存值和取值方式
最近在开发中存储用户名信息,为了方便就使用了sessionStorage,但是写好才想到sessionStorage在IE下面是不支持的,所以无奈还是使用了cookie 那么接下来就谈谈怎么使用coo ...
- onSubmit的使用
在web开发中,我们经常会遇到,一点回车键表单就自己提交的问题,能不能禁用回车键呢,答案是肯定的. Html代码 <from action="" method=" ...
- android的Broadcast receiver
broadcast receiver是用来监听intent的. android大量使用了broadcast receiver,比如:开机.电话打进来.发送消息,手机电量过低 有两种方式注册broadc ...
- 常见android手机分辨率
4:3 VGA 640*480 (Video Graphics Array) QVGA 320*240 (Quarter VGA) HVGA 480*320 (Half-size VGA) ...
- Java基础知识强化之IO流笔记36:InputStreamReader/OutputStreamWriter 复制文本文件案例
1. 需求:把当前项目目录下的a.txt内容复制到当前项目目录下的b.txt中. 数据源: a.txt -- 读取数据 -- 字符转换流 -- InputStreamReader 目的地: b.t ...