2016-11-17 175 views
0

我有我需要設置的現有項目中給出此Procfile。無法啓動與工頭啓動rails服務器

web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb 
worker: bundle exec rake jobs:work 
sidekiq_worker: env DB_POOL=${SIDEKIQ_DB_POOL:-10} bundle exec sidekiq -c ${SIDEKIQ_CONCURRENCY:-4} -q $RAILS_ENV"_magplus_background_job" -i ${DYNO#worker.} 
app_build_sidekiq_worker: env DB_POOL=${APP_BUILD_SIDEKIQ_DB_POOL:-3} bundle exec sidekiq -c ${APP_BUILD_SIDEKIQ_CONCURRENCY:-1} -q $RAILS_ENV"_app_build_background_job" -i ${DYNO#worker.} 
message_queue_worker: bundle exec rails runner 'MessageQueueWorker.new.perform' 
message_queue_publisher: bundle exec rails runner 'Caerbannog::Queue.publish' 

我安裝了這樣的領班。

MAC-Nod-Dev:service-plus dev$ gem install foreman 
Successfully installed foreman-0.82.0 
1 gem installed 

當我做foreman start我收到以下錯誤:與任何rails sforeman run rails s運行流暢運行軌道服務器時通常

18:19:04 web.1      | started with pid 8129 
18:19:04 worker.1     | started with pid 8130 
18:19:04 sidekiq_worker.1   | started with pid 8131 
18:19:04 app_build_sidekiq_worker.1 | started with pid 8132 
18:19:04 message_queue_worker.1  | started with pid 8133 
18:19:04 message_queue_publisher.1 | started with pid 8134 
18:19:07 web.1      | I, [2016-11-17T18:19:07.856228 #8129] INFO -- : Refreshing Gem list 
18:19:08 sidekiq_worker.1   | missing argument: -i 
18:19:08 sidekiq_worker.1   | /Users/dev/.rvm/gems/[email protected]/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:338:in `parse_options' 
18:19:08 sidekiq_worker.1   | /Users/dev/.rvm/gems/[email protected]/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:208:in `setup_options' 
18:19:08 sidekiq_worker.1   | /Users/dev/.rvm/gems/[email protected]/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:38:in `parse' 
18:19:08 sidekiq_worker.1   | /Users/dev/.rvm/gems/[email protected]/gems/sidekiq-3.3.3/bin/sidekiq:7:in `<top (required)>' 
18:19:08 sidekiq_worker.1   | /Users/dev/.rvm/gems/[email protected]/bin/sidekiq:23:in `load' 
18:19:08 sidekiq_worker.1   | /Users/dev/.rvm/gems/[email protected]/bin/sidekiq:23:in `<main>' 
18:19:08 sidekiq_worker.1   | /Users/dev/.rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `eval' 
18:19:08 sidekiq_worker.1   | /Users/dev/.rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `<main>' 
18:19:08 app_build_sidekiq_worker.1 | missing argument: -i 
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/[email protected]/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:338:in `parse_options' 
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/[email protected]/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:208:in `setup_options' 
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/[email protected]/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:38:in `parse' 
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/[email protected]/gems/sidekiq-3.3.3/bin/sidekiq:7:in `<top (required)>' 
18:19:08 app_build_sidekiq_worker.1 | /Users/dev.rvm/gems/[email protected]/bin/sidekiq:23:in `load' 
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/[email protected]/bin/sidekiq:23:in `<main>' 
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `eval' 
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `<main>' 
18:19:09 app_build_sidekiq_worker.1 | exited with code 1 
18:19:09 system      | sending SIGTERM to all processes 
18:19:09 sidekiq_worker.1   | exited with code 1 
18:19:09 worker.1     | rake aborted! 
18:19:09 worker.1     | SignalException: SIGTERM 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/actionpack-4.2.6/lib/action_dispatch/http/response.rb:76:in `require' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/actionpack-4.2.6/lib/action_dispatch/http/response.rb:76:in `<class:Response>' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/actionpack-4.2.6/lib/action_dispatch/http/response.rb:36:in `<module:ActionDispatch>' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/actionpack-4.2.6/lib/action_dispatch/http/response.rb:7:in `<top (required)>' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/actionpack-4.2.6/lib/action_controller/metal/live.rb:1:in `require' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/actionpack-4.2.6/lib/action_controller/metal/live.rb:1:in `<top (required)>' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/actionpack-4.2.6/lib/action_controller.rb:4:in `require' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/actionpack-4.2.6/lib/action_controller.rb:4:in `<top (required)>' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/actionpack-4.2.6/lib/action_controller/railtie.rb:2:in `require' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/actionpack-4.2.6/lib/action_controller/railtie.rb:2:in `<top (required)>' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/activerecord-4.2.6/lib/active_record/railtie.rb:9:in `require' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/activerecord-4.2.6/lib/active_record/railtie.rb:9:in `<top (required)>' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/railties-4.2.6/lib/rails/all.rb:13:in `require' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/railties-4.2.6/lib/rails/all.rb:13:in `block in <top (required)>' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/railties-4.2.6/lib/rails/all.rb:11:in `each' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/gems/railties-4.2.6/lib/rails/all.rb:11:in `<top (required)>' 
18:19:09 worker.1     | /Users/dev/munam/projects/magplus/service-plus/config/application.rb:3:in `require' 
18:19:09 worker.1     | /Users/dev/munam/projects/magplus/service-plus/config/application.rb:3:in `<top (required)>' 
18:19:09 worker.1     | /Users/dev/munam/projects/magplus/service-plus/Rakefile:4:in `require' 
18:19:09 worker.1     | /Users/dev/munam/projects/magplus/service-plus/Rakefile:4:in `<top (required)>' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `eval' 
18:19:09 worker.1     | /Users/dev/.rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `<main>' 
18:19:09 worker.1     | (See full trace by running task with --trace) 
18:19:09 message_queue_publisher.1 | terminated by SIGTERM 
18:19:09 message_queue_worker.1  | terminated by SIGTERM 
18:19:09 worker.1     | exited with code 1 
18:19:14 system      | sending SIGKILL to all processes 

而且系統中斷,但奇怪的是,但我需要將它與工頭我需要啓動不同的選項卡,顯然這是一個更好的方法。如果有人幫我在這裏,我會非常感激。

非常感謝!

回答

0

您的DYNO變量未設置,因此您沒有將任何內容傳遞給-i。它缺少必要的參數。