我正在运行GitLab 5.2我相信FreeBSD 9.1-RELEASE已经好几个月了,事情进展顺利,没有明显的问题我能看到。
我最近按照gitlab.org上提供的指南升级到了6.0,不幸的是我现在收到如下错误:
No such file or directory - posix_spawnp
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:187:in `_pspawn'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:187:in `pspawn'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:160:in `spawn'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/posix-spawn-0.3.6/lib/posix/spawn.rb:307:in `popen4'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/posix-spawn-0.3.6/lib/posix/spawn/child.rb:105:in `exec!'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/posix-spawn-0.3.6/lib/posix/spawn/child.rb:80:in `initialize'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/gitlab-grit-2.6.0/lib/grit/git.rb:341:in `new'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/gitlab-grit-2.6.0/lib/grit/git.rb:341:in `native'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/gitlab-grit-2.6.0/lib/grit/git.rb:368:in `method_missing'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/gitlab-grit-2.6.0/lib/grit/repo.rb:558:in `log'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/gitlab_git-2.1.0/lib/gitlab_git/repository.rb:180:in `log'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/gitlab_git-2.1.0/lib/gitlab_git/commit.rb:52:in `find'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/gitlab_git-2.1.0/lib/gitlab_git/commit.rb:64:in `last'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/gitlab_git-2.1.0/lib/gitlab_git/repository.rb:90:in `has_commits?'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/gitlab_git-2.1.0/lib/gitlab_git/repository.rb:96:in `empty?'
/tank/gitlab/gitlab/app/models/repository.rb:17:in `empty?'
/tank/gitlab/gitlab/app/models/project.rb:345:in `empty_repo?'
/tank/gitlab/gitlab/lib/tasks/gitlab/check.rake:519:in `block in check_repos_post_receive_hooks_is_link'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/activerecord-3.2.13/lib/active_record/relation/batches.rb:21:in `block (2 levels) in find_each'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/activerecord-3.2.13/lib/active_record/relation/batches.rb:21:in `each'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/activerecord-3.2.13/lib/active_record/relation/batches.rb:21:in `block in find_each'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/activerecord-3.2.13/lib/active_record/relation/batches.rb:72:in `find_in_batches'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/activerecord-3.2.13/lib/active_record/relation/batches.rb:20:in `find_each'
/tank/gitlab/gitlab/vendor/bundle/ruby/1.9/gems/activerecord-3.2.13/lib/active_record/querying.rb:8:in `find_each'
我肯定不是专家,但我不确定FreeBSD是否提供任何posix兼容性。我手动安装了posix-spawn gem,但没有区别。我无法通过搜索找到帮助,我能看到的唯一类似情况归结为丢失的pygments,但我安装了它。
在FreeBSD上使用GitLab是否无法使用更高版本?我看到非官方的FreeBSD / GitLab安装指南仅适用于5.1和5.2,因此可能是一个指示。如果是这样的话会很遗憾,GitLab是一个很棒的软件,我不想放弃它。
感谢一些见解,谢谢
答案 0 :(得分:0)
确保在 gitlab / config / gitlab.yml 中设置 git 的正确路径,因为FreeBSD默认将端口/包安装到/ usr / local:
git:
bin_path: /usr/local/bin/git
然后重启GitLab。
如何调试:
将该函数的变量打印到 gitlab / vendor / bundle / ruby / 1.9 / gems / posix-spawn-0.3.6 / lib / posix / spawn.rb 187 (根据需要调整):
puts "DEBUG"
puts env
puts argv
puts options
_pspawn(env, argv, options)
运行应用程序状态:
# bundle exec rake gitlab:check RAILS_ENV=production
{}
[["/usr/bin/git", "/usr/bin/git"], "--git-dir=/home/git/repositories/root/git-playground-project.git", "rev-parse", "HEAD"]
{:in=>#<IO:fd 13>, #<IO:fd 14>=>:close, :out=>#<IO:fd 16>, #<IO:fd 15>=>:close, :err=>#<IO:fd 18>, #<IO:fd 17>=>:close}
找到调试行并验证参数。
祝你好运!