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
  • Merge requests
  • !2994

Merged
Created Feb 14, 2013 by Administrator@rootOwner

Fix gitlab:setup task on fresh installation

  • Overview 2
  • Commits 2
  • Changes 3

Created by: dasbh

Fresh installation from master throws below error on gitlab:setup task

$bundle exec rake gitlab:setup RAILS_ENV=production

This will rebuild an authorized_keys file.                                  
You will lose any data stored in /home/git/.ssh/authorized_keys.            
Do you want to continue (yes/no)? yes                                       

Mysql2::Error: Table 'gitlabhq_production.keys' doesn't exist: SHOW FULL FIELDS FROM `keys`
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in `query'
......................[truncated trace] ....
/home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/activerecord-3.2.12/lib/active_record/querying.rb:8:in `find_each'
/home/git/gitlab/lib/tasks/gitlab/shell.rake:35:in `setup'
/home/git/gitlab/lib/tasks/gitlab/setup.rake:4:in `block (2 levels) in <top (required)>'
Tasks: TOP => gitlab:setup
(See full trace by running task with --trace)

This looks like task gitlab:setup invokes wrong setup method.. aparent from trace (/home/git/gitlab/lib/tasks/gitlab/shell.rake:35:in `setup') and falls over because there no tables on db.

Further verified by running

$bundle exec rake gitlab:shell:setup RAILS_ENV=production 

This simple pull request is to rename setup to setup_db so that it does not collide with setup method in shell.rake

I have verified this changes and successfully installed gitlab from master with gitlab-shell.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: github/fork/dasbh/master