1

我刚刚在我的服务器上安装了一个新的 gitorious,当我发现 git-poller 没有运行时想要对其进行测试。它也不想开始。

我遵循了本指南:http://gitorious.org/gitorious/pages/DebianSqueezeInstallation,我的系统是 Debian Squeeze 和 Ruby -v 说 ruby​​ 1.8.7

到目前为止,该指南中的所有内容都有效。系统已启动并正在运行,但我无法启动轮询器。所有轮询器写入日志的内容如下:

tmp/pids/poller.log

*** below you find the most recent exception thrown, this will be likely (but not certainly) the exception that made the application exit abnormally ***
#<MissingSourceFile: no such file to load -- user_auto_completions_helper>
*** below you find all exception objects found in memory, some of them may have been thrown in your application, others may just be in memory because they are standard exceptions ***
#<NoMemoryError: failed to allocate memory>
#<SystemStackError: stack level too deep>
#<fatal: exception reentered>
#<LoadError: no such file to load -- daemons>
#<TypeError: Expected a filter, an endpoint, a callable or a list of any of these.>
#<NameError: uninitialized constant ActiveMessaging>
#<MissingSourceFile: no such file to load -- user_auto_completions_helper>

tmp/pids/poller.output

/home/clients/client1/web85/web/vendor/rails/activesupport/lib/active_support/dependencies.rb:443:in `load_missing_constant': uninitialized constant ActiveMessaging (NameError)
        from /home/clients/client1/web85/web/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
        from /home/clients/client1/web85/web/vendor/rails/activesupport/lib/active_support/dependencies.rb:92:in `const_missing'
        from /home/clients/client1/web85/web/lib/gitorious/messaging/stomp_poller.rb:13
        from /var/lib/gems/1.8/gems/daemons-1.1.0/lib/daemons/application.rb:203:in `load'
        from /var/lib/gems/1.8/gems/daemons-1.1.0/lib/daemons/application.rb:203:in `start_load'
        from /var/lib/gems/1.8/gems/daemons-1.1.0/lib/daemons/application.rb:292:in `start'
    from /var/lib/gems/1.8/gems/daemons-1.1.0/lib/daemons/controller.rb:70:in `run'
    from /var/lib/gems/1.8/gems/daemons-1.1.0/lib/daemons.rb:143:in `run'
    from /var/lib/gems/1.8/gems/daemons-1.1.0/lib/daemons/cmdline.rb:112:in `call'
    from /var/lib/gems/1.8/gems/daemons-1.1.0/lib/daemons/cmdline.rb:112:in `catch_exceptions'
    from /var/lib/gems/1.8/gems/daemons-1.1.0/lib/daemons.rb:142:in `run'
    from script/poller:30

我使用 ispconfig 作为网络服务器管理工​​具,这就是奇怪路径的来源。我改变了从howto到fit的所有路径。

有人有想法吗?如果需要,我可以提供更多材料,但我只是不知道什么有用。这是我关于 stackoverflow 的第一个问题,所以如果我没有做对所有事情,请不要开枪 :)

4

1 回答 1

2

经过大量阅读和反复试验(我从头开始大约 3 次,从源代码和 RVM 尝试 Ruby 1.9.2 和 REE)我尝试了另一个 howto [1],它与第一个有一个很大的不同:它建议下载并安装 Rubygems 1.4.2 而不是 Rubygems 的 apt 版本。

起初我不想这样做,因为我担心它会破坏我的系统(该服务器上运行了很多其他的东西,包括 Redmine),但是在我重新安装了所有丢失的 gems 之后再次工作。

现在一切(Gitorious 和 Redmine)都在使用 Ruby 1.8.7 的 apt 版本和 Rubygems 1.4.2 的非 apt 版本。

[1] http://cjohansen.no/en/ruby/setting_up_gitorious_on_your_own_server/

由于我偶然发现了另一个问题,希望是最后一个问题:我为我的标准 Web 用户安装了 gitorious(为了尊重 ISPConfig 的政策)并为存储库创建了一个新的 git-user。为了能够交换数据,我将两者都添加到同一个用户组并修复了权限。

我遇到的问题是 git poller 为他自己添加了新的存储库,这意味着“git:git”而不是“git:sharedgroup”。要解决此问题,您只需为 git 文件夹(在我的情况下为 /var/git)设置默认组 ID:

chgrp -R <group_name> /var/git
chmod -R g+s /var/git

看起来上面的两个命令确实有效,但是添加一个新项目再次破坏了一切,因为 git-poller 为项目和存储库添加了一个文件夹,导致存储库文件夹再次拥有错误的所有者。

我(希望)通过更改我的 /etc/init.d/git-poller 脚本来解决这个问题

/bin/su - git -c "cd /var/www/git.mydomain.com/web;RAILS_ENV=production script/poller $@"

/bin/su - git -c "newgrp <group_name> && cd /var/www/git.mydomain.com/web;RAILS_ENV=production script/poller $@"
于 2012-07-28T22:32:28.053 回答