Why does Foreman not output some things until I press Control-C?

后端 未结 1 921
梦谈多话
梦谈多话 2021-02-04 01:11

I just got into rails programming and it looks like there are two programs I can use to run my project locally: rackup and foreman.

One difference I noticed is that fore

1条回答
  •  南旧
    南旧 (楼主)
    2021-02-04 01:38

    If you are not seeing any output from your program, there is a likely chance that it is buffering stdout. Ruby buffers stdout by default.

    you can fix this by putting the following code in your development.rb file:

    $stdout.sync = true
    

    http://github.com/ddollar/foreman/wiki/Missing-Output

    0 讨论(0)
提交回复
热议问题