foreman
foreman copied to clipboard
Forman doesn't show errors and logs of Procfile commands
My Procfile.https look like this:
web: thin start --ssl --ssl-key-file server.key --ssl-cert-file server.crt --port 3000 redis: redis-server worker: bundle exec rake resque:work QUEUE='*' scheduler: bundle exec rake resque:scheduler guard: guard -P livereload
and I just find out that running the first command - web using forman start -f Procfile.https
doesn't show the errors of this command, but when I run this line alone in terminal, I can see the exact errors.
Does foreman hide the errors, or maybe he doesn't even get those errors from his child commands
Am I clear enough? does anybody know what I'm talking about?
The output from thin is probably buffered, see https://stackoverflow.com/questions/29998728/what-stdout-sync-true-means
Drop this early in your app somewhere:
$stdout.sync = true
$stderr.sync = true
Drop this early in your app somewhere:
$stdout.sync = true $stderr.sync = true
I'm having trouble with this. I've been using foreman for years and all of my older apps have $stdout.sync = true in it - usually at the bottom of development.rb. Fast forward to today with Rails 6.1, Ruby 2.7, and foreman 0.87.2, nothing seems to work. development.rb doesn't work. Even if I try in config.ru above run Rails.application it doesn't work.
I usually just open up another Terminal tab and tail -f log/development.log - but I sure do miss not having to do this and having the development log scroll like it always has.