无法通过领班输出登录控制台

时间:2015-07-14 14:04:15

标签: ruby-on-rails-4 console foreman puts

我有一个与领班0.78.0

运行的rails 4.2.1应用程序

每当我尝试使用" puts"要记录我的控制台中的值,没有任何附加。我尝试谷歌搜索一下,但我发现没有可行的解决方案。

我尝试在我的development.rb中添加$ stdout.sync = true但到目前为止没有结果(是的,我重新启动了foreman)

由于我的应用程序使用angularjs运行,因此只有在服务器端附加某些内容而没有任何日志时,调试往往很难。

有没有办法在控制台中输出日志并修复此问题?我知道它一定是配置问题,因为我的一些同事可以在同一个项目中完成。我只是没有看到他们和我之间的区别。

这是我开始领班时能够看到的唯一输出。

09:53:15 web.1    | started with pid 68370
09:53:15 worker.1 | started with pid 68371
09:53:17 web.1    | [68370] Puma starting in cluster mode...
09:53:17 web.1    | [68370] * Version 2.11.2 (ruby 2.2.2-p95), codename: Intrepid Squirrel
09:53:17 web.1    | [68370] * Min threads: 1, max threads: 4
09:53:17 web.1    | [68370] * Environment: development
09:53:17 web.1    | [68370] * Process workers: 2
09:53:17 web.1    | [68370] * Phased restart available
09:53:17 web.1    | [68370] * Listening on tcp://0.0.0.0:5060
09:53:17 web.1    | [68370] Use Ctrl-C to stop
09:53:29 web.1    | /Users/myuser/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/http/mime_type.rb:163: warning: already initialized constant Mime::XLSX
09:53:29 web.1    | /Users/myuser/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/http/mime_type.rb:163: warning: previous definition of XLSX was here
09:53:29 web.1    | /Users/myuser/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/http/mime_type.rb:163: warning: already initialized constant Mime::XLSX
09:53:29 web.1    | /Users/myuser/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/http/mime_type.rb:163: warning: previous definition of XLSX was here
09:53:29 worker.1 | /Users/myuser/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/http/mime_type.rb:163: warning: already initialized constant Mime::XLSX
09:53:29 worker.1 | /Users/myuser/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/actionpack-4.2.1/lib/action_dispatch/http/mime_type.rb:163: warning: previous definition of XLSX was here
09:53:29 web.1    | [68370] - Worker 0 (pid: 68372) booted, phase: 0
09:53:29 web.1    | [68370] - Worker 1 (pid: 68373) booted, phase: 0
09:53:32 worker.1 | 2015-07-14T13:53:32.801Z 68371 TID-ow3bp4a9w INFO: Running in ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14]
09:53:32 worker.1 | 2015-07-14T13:53:32.801Z 68371 TID-ow3bp4a9w INFO: See LICENSE and the LGPL-3.0 for licensing details.
09:53:32 worker.1 | 2015-07-14T13:53:32.801Z 68371 TID-ow3bp4a9w INFO: Upgrade to Sidekiq Pro for more features and support: http://sidekiq.org/pro
09:53:32 worker.1 | 2015-07-14T13:53:32.801Z 68371 TID-ow3bp4a9w INFO: Booting Sidekiq 3.3.4 with redis options {:url=>nil}
09:53:32 worker.1 | 2015-07-14T13:53:32.801Z 68371 TID-ow3bp4a9w INFO: Starting processing, hit Ctrl-C to stop

提前感谢您的时间。

1 个答案:

答案 0 :(得分:0)

问题不在于工头...经过3个小时的调试后,我发现这是一种误导信息的力量......不知道为什么但是通过使用符号链接没有出现在安慰。当我尝试使用我的IP地址而不是它有效...不确定为什么但是只要解决问题一切都很好。