1

我在 ubuntu 12.04 系统上安装了 gitlab 6.0。如果您遵循升级指南,系统会指示您运行多个 rake 命令。

从 6-0-stable 升级到 6-1-stable

root@gitlab:/home/git/gitlab/lib/tasks/migrate# sudo -u git -H bundle exec rake migrate_iids RAILS_ENV=production --trace
(in /home/git/gitlab)
rake aborted!
Don't know how to build task 'migrate_iids'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/task_manager.rb:49:in `[]'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:148:in `invoke_task'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:106:in `block in top_level'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:115:in `run_with_threads'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:100:in `top_level'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:78:in `block in run'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:165:in `standard_exception_handling'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/lib/rake/application.rb:75:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/rake-10.1.0/bin/rake:33:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/bin/rake:23:in `load'
/home/git/gitlab/vendor/bundle/ruby/2.0.0/bin/rake:23:in `<main>'

有关系统的其他信息

root@gitlab:/home/git/gitlab# git branch
  6-0-stable
* 6-1-stable

root@gitlab:/home/git/gitlab# ruby --version
ruby 2.0.0p299 (2013-08-29) [x86_64-linux-gnu]

root@gitlab:/home/git/gitlab# gem --version
2.0.7

root@gitlab:/home/git/gitlab# rake --version
rake, version 10.0.4

为什么我不能运行耙子?

4

1 回答 1

1

我找到了解决方案。

将分支从 6-0-stable 切换到 6-1-stable 似乎已经删除了该文件。

我通过运行 git status 发现了这一点

root@gitlab:/home/git/gitlab# git status
# On branch 6-1-stable
# Changes not staged for commit:
#   (use "git add/rm <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   deleted:    lib/tasks/migrate/migrate_iids.rake
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   app/models/deprecated/
#   lib/tasks/migrate/migrate_global_projects.rake
#   lib/tasks/migrate/migrate_groups.rake
#   lib/tasks/migrate/migrate_inline_notes.rake
#   lib/tasks/migrate/migrate_keys.rake
#   lib/tasks/migrate/migrate_milestones.rake
#   lib/tasks/migrate/migrate_mr.rake
#   lib/tasks/migrate/migrate_note_linecode.rake

通过在 6-1-0 分支上运行 git reset --hard ,我能够运行 rake

于 2013-09-28T19:17:20.167 回答