喜欢上一个问题: 500 Internal Server Error - ActionView::Template::Error in Rails Production
我通过网页(内部500)浏览git树时遇到同样的错误,但那里的答案说我应该运行
bundle exec rake assets:precompile
并提到我 http://guides.rubyonrails.org/asset_pipeline.html#in-production
我在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'
我很乐意根据需要运行任何命令并编辑任何配置文件,但请告诉我文件的位置以及如何运行命令。感谢您的帮助。