HTTP 500 after pushed new branch
- Summary: HTTP 500 after pushed new branch
- Steps to reproduce: Push new branch to repository which had only one branch.
- Expected behavior: Open dashboard/pushed project's summary
- Observed behavior: an http 500 error. This don't happen if the repository has only one repository.
- Relevant logs: on production.log:
Started GET "/" for 127.0.0.1 at 2014-10-07 02:58:01 +0900
Processing by DashboardController#show as HTML
Completed 500 Internal Server Error in 18ms
AActionView::Template::Error (undefined method `[]' for nil:NilClass):
1: - if show_last_push_widget?(event)
2: .event-last-push
3: .event-last-push-text
4: %span You pushed to
app/models/event.rb:186:in `branch?'
app/models/event.rb:257:in `last_push_to_non_root?'
app/helpers/application_helper.rb:125:in `show_last_push_widget?'
app/views/events/_event_last_push.html.haml:1:in `_app_views_events__event_last_push_html_haml___1804062689955078378_17289990740'
app/views/dashboard/_activities.html.haml:1:in `_app_views_dashboard__activities_html_haml__1035379394890491641_17290068460'
app/views/dashboard/show.html.haml:4:in `_app_views_dashboard_show_html_haml___3233779611042255805_17290228660'
app/controllers/dashboard_controller.rb:27:in `show'
Started GET "/" for 127.0.0.1 at 2014-10-07 02:58:01 +0900
Processing by DashboardController#show as HTML
Completed 500 Internal Server Error in 17ms
ActionView::Template::Error (undefined method `[]' for nil:NilClass):
1: - if show_last_push_widget?(event)
2: .event-last-push
3: .event-last-push-text
4: %span You pushed to
app/models/event.rb:186:in `branch?'
app/models/event.rb:257:in `last_push_to_non_root?'
app/helpers/application_helper.rb:125:in `show_last_push_widget?'
app/views/events/_event_last_push.html.haml:1:in `_app_views_events__event_last_push_html_haml___1804062689955078378_17289990740'
app/views/dashboard/_activities.html.haml:1:in `_app_views_dashboard__activities_html_haml__1035379394890491641_17290068460'
app/views/dashboard/show.html.haml:4:in `_app_views_dashboard_show_html_haml___3233779611042255805_17290228660'
app/controllers/dashboard_controller.rb:27:in `show'
Started GET "/dashboard/projects" for 127.0.0.1 at 2014-10-07 02:58:25 +0900
Processing by DashboardController#projects as HTML
Completed 200 OK in 55ms (Views: 38.6ms | ActiveRecord: 6.9ms)
Started GET "/kyontan/nan-simulator" for 127.0.0.1 at 2014-10-07 02:58:34 +0900
Processing by ProjectsController#show as HTML
Parameters: {"id"=>"kyontan/nan-simulator"}
Completed 500 Internal Server Error in 31ms
ActionView::Template::Error (undefined method `[]' for nil:NilClass):
1: - if show_last_push_widget?(event)
2: .event-last-push
3: .event-last-push-text
4: %span You pushed to
app/models/event.rb:186:in `branch?'
app/models/event.rb:257:in `last_push_to_non_root?'
app/helpers/application_helper.rb:125:in `show_last_push_widget?'
app/views/events/_event_last_push.html.haml:1:in `_app_views_events__event_last_push_html_haml___1804062689955078378_17289990740'
app/views/projects/show.html.haml:16:in `_app_views_projects_show_html_haml__1338895115903519110_17288786460'
app/controllers/projects_controller.rb:71:in `block (2 levels) in show'
app/controllers/projects_controller.rb:65:in `show'
Started GET "/kyontan/nan-simulator" for 127.0.0.1 at 2014-10-07 02:58:34 +0900
Processing by ProjectsController#show as HTML
Parameters: {"id"=>"kyontan/nan-simulator"}
Completed 500 Internal Server Error in 41ms
ActionView::Template::Error (undefined method `[]' for nil:NilClass):
1: - if show_last_push_widget?(event)
2: .event-last-push
3: .event-last-push-text
4: %span You pushed to
app/models/event.rb:186:in `branch?'
app/models/event.rb:257:in `last_push_to_non_root?'
app/helpers/application_helper.rb:125:in `show_last_push_widget?'
app/views/events/_event_last_push.html.haml:1:in `_app_views_events__event_last_push_html_haml___1804062689955078378_17289990740'
app/views/projects/show.html.haml:16:in `_app_views_projects_show_html_haml__1338895115903519110_17288786460'
app/controllers/projects_controller.rb:71:in `block (2 levels) in show'
app/controllers/projects_controller.rb:65:in `show'
Note: First two errors occured same time in one request.
- Output of checks:
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message.
Checking Environment ...
Git configured for git user? ... yes
Checking Environment ... Finished
Checking GitLab Shell ...
GitLab Shell version >= 2.0.1 ? ... OK (2.0.1)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
Satellites access is drwxr-x---? ... yes
hooks directories in repos are links: ...
3/1 ... ok
3/4 ... ok
3/7 ... ok
3/8 ... ok
3/9 ... ok
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
/home/git/repositories: OK
/home/git/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 2.8.17
Send ping to redis server: PONG
gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... no
Try fixing it:
sudo -u git -H RAILS_ENV=production bin/background_jobs start
For more information see:
doc/install/installation.md in section "Install Init Script"
see log/sidekiq.log for possible errors
Please fix the error above and rerun the checks.
Checking Sidekiq ... Finished
Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned UsersGroups? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
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: ...
3/1 ... yes
3/4 ... yes
3/7 ... yes
3/8 ... yes
3/9 ... yes
Projects have satellites? ...
3/1 ... yes
3/4 ... yes
3/7 ... yes
3/8 ... yes
3/9 ... yes
Redis version >= 2.0.0? ... yes
Ruby version >= 2.0.0 ? ... yes (2.1.3)
Your git bin path is "/usr/local/bin/git"
Git version >= 1.7.10 ? ... yes (2.1.0)
Checking GitLab ... Finished
Note: Error of not runnning and no Init script is from characteristic environment of FreeBSD.
- Version of GitLab you are running: GitLab 7.3.2 f029e53
- Describe your setup:
System information
System: FreeBSD 10.0-RELEASE-p9
Current User: git
Using RVM: no
Ruby Version: 2.1.3p242
Gem Version: 1.8.29
Bundler Version:1.7.3
Rake Version: 10.3.2
Sidekiq Version:2.17.0
GitLab information
Version: 7.3.2
Revision: f092e53
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: http://git.monora.me
HTTP Clone URL: http://git.monora.me/some-project.git
SSH Clone URL: git@git.monora.me:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 2.0.1
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/local/bin/git