Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Templates 500内部服务器错误-ActionView::Template::Rails生产第二遍出错_Templates_Undefined_Gitlab - Fatal编程技术网

Templates 500内部服务器错误-ActionView::Template::Rails生产第二遍出错

Templates 500内部服务器错误-ActionView::Template::Rails生产第二遍出错,templates,undefined,gitlab,Templates,Undefined,Gitlab,上一个问题是: 在通过web internal 500浏览git树时,我也会遇到同样的错误,但那里的答案是我应该运行 bundle exec rake assets:precompile 把我介绍给 我在Ubuntu 14.04 LTS上运行GitLab 7.6.1 0286222,完全是最新的。这使我可以从本地git机器上推拉,也可以通过web服务四处查看。我按照下面的建议运行了修改后的资产:预编译,但问题仍然存在 至于我的具体错误。在生产日志中,我得到: git@git01:~/gitl

上一个问题是:

在通过web internal 500浏览git树时,我也会遇到同样的错误,但那里的答案是我应该运行

bundle exec rake assets:precompile 把我介绍给

我在Ubuntu 14.04 LTS上运行GitLab 7.6.1 0286222,完全是最新的。这使我可以从本地git机器上推拉,也可以通过web服务四处查看。我按照下面的建议运行了修改后的资产:预编译,但问题仍然存在

至于我的具体错误。在生产日志中,我得到:

git@git01:~/gitlab/log$ tail -n 20 production.log Started GET "/chef/cheftest/tree/master/cookbooks" for 127.0.0.1 at 2014-12-24 16:03:25 -0500 Processing by Projects::TreeController#show as HTML Parameters: {"project_id"=>"chef/cheftest", "id"=>"master/cookbooks"} Completed 500 Internal Server Error in 490ms 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___742655240099390426_69818877669240' 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__47884322835133800_69818822684460' app/views/projects/tree/show.html.haml:9:in `_app_views_projects_tree_show_html_haml__1575471590709486656_69818822138660' app/controllers/projects/tree_controller.rb:13:in `show'
我很乐意根据需要运行任何命令和编辑任何配置文件,但请让我知道文件在哪里以及如何运行命令。感谢您的帮助。

您尝试过sudo gitlab rake assets:precompile吗?谢谢您的建议。我在Ubuntu14.04 LTS上建立了一个新的实例:GitLab 7.6.1 0286222完全更新我在新服务器上复制了问题git repo,并得到了相同的错误。接下来,我按照建议运行了gitlab rake命令,在给出Errno::EACCES:Permission denied@rb_sysopen-。。。。在这种情况下,我只是将有问题的文件移动到/tmp并重试。在得到另一个权限错误之前,在编译中得到了进一步的修改。在这种情况下,我使用touch创建了一个已丢失的空文件,并使用chmod授予访问权限。这就成功了,我现在可以快速预编译,没有错误。新的错误块是:2014年12月31日11:57:57-0500按项目处理:TreeControllershow作为HTML参数:{project_id=>chef/cheftest,id=>master/cookbooks}在1085ms ActionView::Template::Error undefined method[]”中为nil:NilClass:1:-tree,commit=submodule\u linkssubmodule\u项2完成了500个内部服务器错误:%tr{class:tree项}3:%td.tree-item-file-name 4:%i.fa.fa-archive app/models/repository.rb:162:in method_missing'…此错误的关键是调用“method_missing”下面的行。它有“submodule\u url\u for”,指的是称为子模块的git子回购。特别是一个用户将外部repo的内容复制到了共享repo的子目录中,并包含了.git子目录。Git本身对不正确的子模块只是有点不高兴,但gitlab给出了500个错误。删除从“git submodule”命令返回的子目录解决了此问题。