Gitorious:git-poller不会启动

时间:2012-07-26 23:21:06

标签: ruby gem gitorious

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

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

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

TMP /的PID / 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 /的PID / 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作为网络服务器管理工​​具,这就是奇怪路径的来源。我改变了所有从道路到适合的路径,等等。

有人有个主意吗?如果需要,我可以提供更多材料,但我不知道什么是有用的。这是我关于stackoverflow的第一个问题,所以如果我没有做好一切,请不要开枪!)

1 个答案:

答案 0 :(得分:2)

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

起初我不想这样做,因为我担心它会破坏我的系统(在服务器上运行很多其他的东西,包括Redmine),但它重新安装后失踪的宝石一切都恢复了。

现在所有东西(Gitorious和Redmine)都在使用apt-version of Ruby 1.8.7和非apt-version of Rubygems 1.4.2。

[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-folder的默认组ID(在我的情况下为/ var / git):

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

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

我(希望)修改了我的/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 $@"