Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用“puts”来测试一些托管在 Heroku 上的 Sinatra 应用程序。有趣的是,输出似乎在排队,只有在重新启动 Heroku dyno 时才会显示。我尝试过使用“Thin”和“Webrick”,但遇到了同样的问题。
有什么想法吗?
正如您在heroku 文档中看到的那样:将其添加到您的 config.ru:
$stdout.sync = true
不要忘记$之前的stdout,否则将无法正常工作。
$
stdout