Rails + master + working server freezes

On my local machine, I am trying to run an application for rails and postpone work using Foreman. My Procfile looks like this:

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

When I start the wizard, only the first two web requests are executed. With the third request, the server freezes. The first request is displayed in the console, the second is not.

If I left the worker in my Procfile, the server is working fine and displays everything on the console. Also, when I start the rails server and work without Foreman, everything works fine.

So it seems like there is a problem with Foreman. I assume that the problem with Foreman does not output anything to the console after the first request, and therefore the buffer is not cleared. I searched for other posts and as a result added STDOUT.sync = true for my development.rb, but without any success.

Does anyone have a key? Thanks!

+6
source share
4 answers

UPDATE: Tracked and resolved here:

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

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


I have the same problem.

Here is a link to the question I asked in stackoverflow. @smek, if you find the answer, answer!

+3
source

I had a similar problem when trying to implement and test DJ + Foreman in a local local environment. I intended to switch to Heroku and used the following article as a guide. If you also go to Heroku, I recommend installing Heroku Toolbelt , which includes Foreman. In my case, I already have Heroku Toolbelt installed, so I just reinstalled it.

+2
source

in most cases, someone left the debugger operator / pry in the code or set a breakpoint somewhere.

if you cannot find anything other than system tools like lsof or gdb to find out what your ruby ​​process is doing at the moment. which may help find the problem.

0
source

I just started using Foreman about an hour ago, and I had problems with my rake tasks and rails server , which crashed when starting Foreman. When I removed the pry stone from my Gemfile, it worked, but that was unacceptable since I use pry in development.

Then I upgraded to version 0.49.0 (which was released about 10 minutes ago) and the problem was fixed. It is a pity that I did not start working on this task an hour later, because then I would get 0.49.0 to start with it, and I did not have to intervene for an hour :)

You should try updating Foreman and see if it fixes your problem.

0
source

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


All Articles