[英]Rails server hangs when started with foreman
Here's what my Procfile looks like: 这是我的Procfile的样子:
web: bundle exec rails server thin -p $PORT -e $RACK_ENV
worker: bundle exec rake jobs:work
I intend to add a worker process because I wish to run some background jobs. 我打算添加一个工作进程,因为我希望运行一些后台作业。 I'm following these instructions
我正在按照以下说明进行操作
This is what I noticed: 这是我注意到的:
STDOUT.sync = true
to config/environments/development.rb and verified the same in the rails console. STDOUT.sync = true
到配置/环境/ development.rb并验证在轨控制台相同。 Did not work. Please help! 请帮忙!
[6]: [6]:
which foreman
/usr/bin/foreman
ls -lah /usr/bin/foreman # checked the updated date
Tracked and resolved here: 在此处跟踪并解决:
https://github.com/ddollar/foreman/issues/244 https://github.com/ddollar/foreman/issues/244
TL;DR: Install the gem, don't use foreman.pkg TL; DR:安装gem,请不要使用foreman.pkg
I'll add than if you're using Heroku, the foreman version included with the heroku toolbelt has the same issue. 我要补充的是,如果您使用的是Heroku,heroku工具带随附的工头版本也会出现相同的问题。
Use the one you can get with gem install foreman
instead. 请改用您可以通过
gem install foreman
获得的版本。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.