Error 500 with empty readme file on tree content view
Summary
On master
, a 500 error is thrown on tree view pages if the readme file is empty. On GitLab.com the block is shown but empty.
Steps to reproduce
- Create an empty
README.md
file - Navigate to the folder containing this file
What is the current bug behavior?
Error 500.
What is the expected correct behavior?
The tree view for the asked directory.
Relevant logs and/or screenshots
undefined method `render_error' for nil:NilClass
app/views/projects/blob/_viewer.html.haml
line 2
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
System information
System:
Current User: user
Using RVM: yes
RVM Version: 1.29.1
Ruby Version: 2.3.3p222
Gem Version: 2.6.12
Bundler Version:1.14.6
Rake Version: 10.5.0
Redis Version: 3.2.8
Git Version: 2.12.2
Sidekiq Version:5.0.0
Go Version: go1.8.1 darwin/amd64
GitLab information
Version: 9.2.0-pre
Revision: efb709178c
Directory: /path/gitlab-development-kit/gitlab
DB Adapter: postgresql
URL: http://localhost:3000
HTTP Clone URL: http://localhost:3000/some-group/some-project.git
SSH Clone URL: ssh://user@localhost:2222/some-group/some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 5.0.3
Repository storage paths:
- default: /path/gitlab-development-kit/repositories
Hooks: /path/gitlab-development-kit/gitlab-shell/hooks
Git: /usr/local/bin/git
Results of GitLab application Check
Checking GitLab Shell ...
GitLab Shell version >= 5.0.3 ? ... OK (5.0.3)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by florent:root, or florent:florent?
default... no
User id for florent: 501. Groupd id for root: group root doesn't exist
Try fixing it:
sudo chown -R florent:root /Users/florent/gitlab-development-kit/repositories
For more information see:
doc/install/installation.md in section "GitLab Shell"
Please fix the error above and rerun the checks.
Repo paths access is drwxrws---?
default... no
Try fixing it:
sudo chmod -R ug+rwX,o-rwx /Users/florent/gitlab-development-kit/repositories
sudo chmod -R ug-s /Users/florent/gitlab-development-kit/repositories
sudo find /Users/florent/gitlab-development-kit/repositories -type d -print0 | sudo xargs -0 chmod g+s
For more information see:
doc/install/installation.md in section "GitLab Shell"
Please fix the error above and rerun the checks.
hooks directories in repos are links: ...
2/1 ... ok
2/2 ... ok
2/3 ... ok
2/4 ... ok
3/5 ... ok
4/6 ... ok
4/7 ... ok
5/8 ... ok
1/9 ... ok
1/10 ... ok
Running /Users/florent/gitlab-development-kit/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /Users/florent/gitlab-development-kit/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes
Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Reply by email ...
Reply by email is disabled in config/gitlab.yml
Checking Reply by email ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured with autocrlf=input? ... yes
Database config exists? ... yes
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Uploads directory setup correctly? ... no
Try fixing it:
sudo chmod 700 /Users/florent/gitlab-development-kit/gitlab/public/uploads
For more information see:
doc/install/installation.md in section "GitLab"
Please fix the error above and rerun the checks.
Init script exists? ... no
Try fixing it:
Install the init script
For more information see:
doc/install/installation.md in section "Install Init Script"
Please fix the error above and rerun the checks.
Init script up-to-date? ... can't check because of previous errors
projects have namespace: ...
2/1 ... yes
2/2 ... yes
2/3 ... yes
2/4 ... yes
3/5 ... yes
4/6 ... yes
4/7 ... yes
5/8 ... yes
1/9 ... yes
1/10 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.3)
Your git bin path is "/usr/local/bin/git"
Git version >= 2.7.3 ? ... yes (2.12.2)
Active users: 49
Checking GitLab ... Finished
Possible fixes
See !11408 (closed)