Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #1714

Closed
Open
Created Oct 16, 2012 by Administrator@rootOwner

Creating a new project raise 500 error due to repository folder not creared before to call Grit

Created by: zedtux

I'm installing Gitlab on my Ubuntu VPS.

I'm using Ruby 1.9.2-p286 with the master branch of Gitlab.

  1. I completely installed it
  2. logged in as [email protected]
  3. immediately created my account as Administrator
  4. login with my account
  5. Delete [email protected] account
  6. Create my new project
  7. Got a 500 error.

Error from log file:

Processing by Admin::ProjectsController#show as HTML
  Parameters: {"id"=>"dotfiles"}
  Rendered admin/shared/_projects_head.html.haml (1.2ms)
  Rendered admin/projects/show.html.haml within layouts/admin (2.6ms)
Completed 500 Internal Server Error in 7ms

ActionView::Template::Error (/home/git/repositories/dotfiles.git):
  5:     %i.icon-edit
  6:     Edit
  7: 
  8: - if !@admin_project.has_post_receive_file? && @admin_project.commit
  9:   %br
  10:   .alert.alert-error
  11:     %span
app/roles/repository.rb:78:in `new'
app/roles/repository.rb:78:in `repo'
app/roles/repository.rb:16:in `commit'
app/views/admin/projects/show.html.haml:8:in `_app_views_admin_projects_show_html_haml___4358526362629108065_193540400'

Code at line app/roles/repository.rb:78:

  def repo
    @repo ||= Grit::Repo.new(path_to_repo)
  end

Opening the Rails console in production environment and executing the following:

irb(main):001:0> Grit::Repo.new("/home/git/repositories/dotfiles.git")
Grit::NoSuchPathError: /home/git/repositories/dotfiles.git
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/bundler/gems/grit-7f35cb98ff17/lib/grit/repo.rb:53:in `initialize'
from (irb):2:in `new'
from (irb):2
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:47:in `start'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands/console.rb:8:in `start'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/railties-3.2.8/lib/rails/commands.rb:41:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
irb(main):002:0> FileUtils.mkdir("/home/git/repositories/dotfiles.git")
=> ["/home/git/repositories/dotfiles.git"]
irb(main):003:0> Grit::Repo.new("/home/git/repositories/dotfiles.git")
=> #<Grit::Repo "/home/git/repositories/dotfiles.git">
irb(main):004:0> 
Assignee
Assign to
Time tracking