1

サーバーに新しいgitoriousをインストールしたところ、git-pollerが実行されていないことがわかったときにテストしたいと思いました。そして、それも始めたくありませんでした。

私はこのガイドに従いました:http://gitorious.org/gitorious/pages/DebianSqueezeInstallation、私のシステムはDebian Squeezeであり、Ruby-vはruby1.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をWebサーバー管理ツールとして使用しています。そこから奇妙なパスが出てきます。すべてのパスをハウツーからフィットに変更しました。

誰かアイデアがありますか?必要に応じてさらに資料を提供することはできますが、何が役立つかわかりません。これはstackoverflowに関する私の最初の質問なので、すべてを正しく行わなかった場合は私を撃たないでください:)

4

1 に答える 1

2

たくさん読んで試行錯誤した後(私は最初から約3回始め、ソースとRVMの両方からRuby 1.9.2とREEを試しました)、最初の方法とは大きな違いがある別の方法[1]を試しました。 Rubygemsのaptバージョンの代わりにRubygems1.4.2をダウンロードしてインストールすることをお勧めします。

最初はそれが私のシステムを壊すのではないかと心配していたのでそれをやりたくありませんでした(Redmineを含むそのサーバーで実行されている他の多くのものがあります)が、私がすべての不足している宝石を再インストールした後再び働いた。

現在、すべて(GitoriousおよびRedmine)は、Ruby1.8.7のaptバージョンとRubygems1.4.2の非aptバージョンで動作しています。

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

別の、うまくいけば最後の問題に遭遇したので、(ISPConfigのポリシーを尊重するために)標準のWebユーザー用にgitoriousをインストールし、リポジトリ用に新しいgit-userを作成しました。データを交換できるようにするために、両方を同じユーザーグループに追加し、アクセス許可を修正しました。

私が遭遇した問題は、gitポーラーが自分用の新しいリポジトリを追加したことでした。つまり、「git:sharedgroup」ではなく「git:git」を意味します。これを修正するには、git-folderのデフォルトのグループID(私の場合は/ var / git)を設定する必要があります。

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

上記の2つのコマンドは機能したようですが、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 に答える