1

ローカル開発 OSX で Foreman GEM を使用すると、すべてのサービスを正しく起動するのに問題があります。問題が発生したため、再起動するたびに Procfile から行を手動でコピーして貼り付けます。とてもイライラする

これは私の Procfile.rb です:

redis: redis-server
resque: bundle exec rake resque:start  &&> log/resque_worker_queue.log
privpub: bundle exec rackup private_pub.ru -s thin -E production & &> log/private_pub.log
sunspot: bundle exec rake sunspot:solr:run

私は常に手動でそれらすべてを開始する必要があります。ターミナルのフォアマン開始でコマンドをコピーして貼り付けますが機能しません。何が欠けていますか?

これはフォアマンの出力です:

    16:13:24 redis.1    | started with pid 11281
16:13:24 resque.1   | started with pid 11282
16:13:24 privpub.1  | started with pid 11283
16:13:24 sunspot.1  | started with pid 11284
16:13:24 redis.1    | [11281] 04 Jun 16:13:24 # Warning: no config file specified, using the default config. In order to specify a config file use 'redis-server /path/to/redis.conf'
16:13:24 redis.1    | [11281] 04 Jun 16:13:24 * Server started, Redis version 2.4.13
16:13:24 redis.1    | [11281] 04 Jun 16:13:24 * DB loaded from disk: 0 seconds
16:13:24 redis.1    | [11281] 04 Jun 16:13:24 * The server is now ready to accept connections on port 6379
16:13:25 redis.1    | [11281] 04 Jun 16:13:25 - DB 0: 21 keys (0 volatile) in 48 slots HT.
16:13:25 redis.1    | [11281] 04 Jun 16:13:25 - 0 clients connected (0 slaves), 955424 bytes in use
16:13:26 privpub.1  | /Users/jordan.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:43:in `require': cannot load such file -- /Users/jordan/rails/books/log/private_pub.log (LoadError)
16:13:26 privpub.1  |   from /Users/jordan/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/builder.rb:43:in `parse_file'
16:13:26 privpub.1  |   from /Users/jordan/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
16:13:26 privpub.1  |   from /Users/jordan/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
16:13:26 privpub.1  |   from /Users/jordan/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
16:13:26 privpub.1  |   from /Users/jordan/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:137:in `start'
16:13:26 privpub.1  |   from /Users/jordan/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/bin/rackup:4:in `<top (required)>'
16:13:26 privpub.1  |   from /Users/jordan/.rvm/gems/ruby-1.9.3-p194/bin/rackup:19:in `load'
16:13:26 privpub.1  |   from /Users/jordan/.rvm/gems/ruby-1.9.3-p194/bin/rackup:19:in `<main>'
16:13:26 privpub.1  | process terminated
16:13:26 system     | sending SIGTERM to all processes
16:13:26 system     | sending SIGTERM to pid 11281
16:13:26 redis.1    | [11281] 04 Jun 16:13:26 # Received SIGTERM, scheduling shutdown...
16:13:26 redis.1    | [11281] 04 Jun 16:13:26 # User requested shutdown...
16:13:26 redis.1    | [11281] 04 Jun 16:13:26 * Saving the final RDB snapshot before exiting.
16:13:26 redis.1    | [11281] 04 Jun 16:13:26 * DB saved on disk
16:13:26 redis.1    | [11281] 04 Jun 16:13:26 # Redis is now ready to exit, bye bye...
16:13:26 system     | sending SIGTERM to pid 11282
16:13:26 resque.1   | rake aborted!
16:13:26 resque.1   | SIGTERM
16:13:26 resque.1   | 
16:13:26 resque.1   | (See full trace by running task with --trace)
16:13:26 system     | sending SIGTERM to pid 11284
16:13:26 sunspot.1  | rake aborted!
16:13:26 sunspot.1  | SIGTERM
16:13:26 sunspot.1  | 
16:13:26 sunspot.1  | (See full trace by running task with --trace)
16:13:26 sunspot.1  | process terminated
16:13:26 resque.1   | process terminated
16:13:26 redis.1    | process terminated
4

1 に答える 1

1

2 行目と 3 行目を次のように変更して、出力リダイレクトを削除してみてください。

resque: bundle exec rake resque:start
privpub: bundle exec rackup private_pub.ru -s thin -E production

Foreman は、コマンドのリダイレクトに問題がある可能性があります: https://github.com/ddollar/foreman/issues/search?q=redirect

于 2012-06-05T21:56:44.947 に答える