root_ref error

Created by: tvb

After creating a new repo on a freshly installed gitlab 4.0 system and pushing my files to branch 'develop' I receive the following error when browsing to its project page.

ActionView::Template::Error (undefined method `root_ref' for nil:NilClass):
    14:         - if @project.repo_exists?
    15:           - if can? current_user, :download_code, @project
    16:             = nav_link(controller: %w(tree blob blame)) do
    17:               = link_to 'Files', project_tree_path(@project, @ref || @repository.root_ref)
    18:             = nav_link(controller: %w(commit commits compare repositories protected_branches)) do
    19:               = link_to "Commits", project_commits_path(@project, @ref || @repository.root_ref)
    20:             = nav_link(path: 'projects#graph') do
  app/views/layouts/project_resource.html.haml:17:in `block in _app_views_layouts_project_resource_html_haml___4060563057975664226_34706840'
  app/helpers/tab_helper.rb:64:in `nav_link'
  app/views/layouts/project_resource.html.haml:16:in `_app_views_layouts_project_resource_html_haml___4060563057975664226_34706840'
  app/controllers/projects_controller.rb:63:in `block (2 levels) in show'
  app/controllers/projects_controller.rb:59:in `show'