简体   繁体   中英

unable to start rails server with foreman start

I have this Procfile given in my existing Project which I need to setup.

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'

I installed foreman like this.

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

When I do foreman start I get the following error:

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/ruby-2.3.1@serviceplus/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:338:in `parse_options'
18:19:08 sidekiq_worker.1           | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:208:in `setup_options'
18:19:08 sidekiq_worker.1           | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:38:in `parse'
18:19:08 sidekiq_worker.1           | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/sidekiq-3.3.3/bin/sidekiq:7:in `<top (required)>'
18:19:08 sidekiq_worker.1           | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/bin/sidekiq:23:in `load'
18:19:08 sidekiq_worker.1           | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/bin/sidekiq:23:in `<main>'
18:19:08 sidekiq_worker.1           | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/bin/ruby_executable_hooks:15:in `eval'
18:19:08 sidekiq_worker.1           | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/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/ruby-2.3.1@serviceplus/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/ruby-2.3.1@serviceplus/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/ruby-2.3.1@serviceplus/gems/sidekiq-3.3.3/lib/sidekiq/cli.rb:38:in `parse'
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/sidekiq-3.3.3/bin/sidekiq:7:in `<top (required)>'
18:19:08 app_build_sidekiq_worker.1 | /Users/dev.rvm/gems/ruby-2.3.1@serviceplus/bin/sidekiq:23:in `load'
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/bin/sidekiq:23:in `<main>'
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/bin/ruby_executable_hooks:15:in `eval'
18:19:08 app_build_sidekiq_worker.1 | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/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/ruby-2.3.1@serviceplus/gems/actionpack-4.2.6/lib/action_dispatch/http/response.rb:76:in `require'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/actionpack-4.2.6/lib/action_dispatch/http/response.rb:76:in `<class:Response>'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/actionpack-4.2.6/lib/action_dispatch/http/response.rb:36:in `<module:ActionDispatch>'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/actionpack-4.2.6/lib/action_dispatch/http/response.rb:7:in `<top (required)>'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/actionpack-4.2.6/lib/action_controller/metal/live.rb:1:in `require'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/actionpack-4.2.6/lib/action_controller/metal/live.rb:1:in `<top (required)>'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/actionpack-4.2.6/lib/action_controller.rb:4:in `require'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/actionpack-4.2.6/lib/action_controller.rb:4:in `<top (required)>'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/actionpack-4.2.6/lib/action_controller/railtie.rb:2:in `require'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/actionpack-4.2.6/lib/action_controller/railtie.rb:2:in `<top (required)>'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/activerecord-4.2.6/lib/active_record/railtie.rb:9:in `require'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/activerecord-4.2.6/lib/active_record/railtie.rb:9:in `<top (required)>'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/railties-4.2.6/lib/rails/all.rb:13:in `require'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/railties-4.2.6/lib/rails/all.rb:13:in `block in <top (required)>'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/gems/railties-4.2.6/lib/rails/all.rb:11:in `each'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/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/ruby-2.3.1@serviceplus/bin/ruby_executable_hooks:15:in `eval'
18:19:09 worker.1                   | /Users/dev/.rvm/gems/ruby-2.3.1@serviceplus/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

And the system breaks but strangely when run the rails server normally with either rails s or foreman run rails s it runs smoothly but I need to it with foreman else I need to start different tabs and obviously that is a better way. I will be really thankful if someone helps me out here.

Thanks a lot in advance!

Your DYNO variable is not set, so you aren't passing anything to -i. It's missing its required argument.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM