Rails server freezes on startup with wizard

Here is what my Procfile looks like:

web: bundle exec rails server thin -p $PORT -e $RACK_ENV worker: bundle exec rake jobs:work 

I intend to add a workflow because I want to run some background jobs. I follow these instructions

Here is what I noticed:

  • No problems arise if the worker starts separately.
  • When I save the second line in the Procfile file and change nothing, the rails server serves a couple of requests and freezes after that
  • As mentioned here , I added STDOUT.sync = true to config / environment / development.rb and confirmed the same thing in the rails console, Doesn't work.
  • Tailed log / development.log and compared it with the materials that the wizard displayed in the shell, and noticed that both correspond to several requests, and then the wizard stopped printing the material in the shell - the next request then hung
  • I updated the wizard using foreman.pkg, as mentioned here, and confirmed the same with [6]
  • It was mentioned here that this may be caused due to a rejection of the debug instruction. I don't use a debugger and I don't have a pry gem or ruby ​​debug gem in my Gemfile.lock
  • I find the symptoms are similar to this unanswered question

Please, help!

[6]:

 which foreman /usr/bin/foreman ls -lah /usr/bin/foreman # checked the updated date 
+1
source share
2 answers

Tracked and resolved here:

https://github.com/ddollar/foreman/issues/244

TL DR: set the gem, do not use foreman.pkg

0
source

I will add that if you use Heroku, the version of the wizard included in the hero's toolbelt has the same problem.

Use the one you can get with gem install foreman .

0
source

Source: https://habr.com/ru/post/919840/


All Articles