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\ ...
随机推荐
- java dubug调试
摘要:调试不仅可以查找到应用程序缺陷所在,还可以解决缺陷.对于Java程序员来说,他们不仅要学会如何在Eclipse里面开发像样的程序,更需要学会如何调试程序.本文介绍了Java程序员必知的10个调试 ...
- poj1637--Sightseeing tour(最大流)
最大流求混合图是否存在欧拉回路. 以下内容摘自http://www.cnblogs.com/Missa/archive/2012/12/05/2803107.html 讲的很清楚. 混合图的欧拉回路问 ...
- Java NIO 缓冲技术详解
缓冲区(buffer)是从即将写入通道(channel)或刚刚从通道中读出的一段数据.它是一个持有数据,并扮演NIO通道端点的对象.缓冲区为数据访问和读写过程提供正式机制. 它是NIO和老版Java ...
- 你真的知道C#的TryParse吗?
博客搬到了fresky.github.io - Dawei XU,请各位看官挪步.最新的一篇是:你真的知道C#的TryParse吗?.
- zabbix邮件报警脚本
#!/usr/bin/python #coding:utf-8 import smtplib from email.mime.text import MIMEText import sys mail_ ...
- java的定时器用法
java定时器的使用 定时器类Timer在java.util包中.使用时,先实例化,然后使用实例的schedule(TimerTask task, long delay)方法,设定指定的任务task在 ...
- 开发XMPP IM
Openfire 是一个用Java 实现的XMPP 服务器,客户端可以通过IQ的方式与其进行通信(其实就是XML),客户端和服务器之间的通信是依靠底层Smack 库提供的各种功能来完成的.其实利用插件 ...
- [Whole Web, Node.js, PM2] Restarting your node.js app on code change using pm2
Aadd watch to the config.json file: { "apps": [{ "name": "App1", " ...
- [React ] React Fundamentals: Component Lifecycle - Mounting Usage
The previous lesson introduced the React component lifecycle mounting and unmounting. In this lesson ...
- vim的一些高级配置
今天有幸看到一篇博文,有一些vim的高级配置 在linux或者unix下面的.vimrc文件中,在其中可以添加如下片段,可以实现解释上面你说的那些高级用法 " Ctrl + K 插入模式下光 ...