查看在Heroku上写入文件系统的日志文件

时间:2014-03-23 04:48:42

标签: ruby-on-rails ruby heroku latex

我有一个gem(rails-latex)在我部署到Heroku的应用程序上无法正常运行但在我的本地应用程序上工作正常。我成功地在Heroku上安装了pdflatex,所以这不是问题。

为了进一步调试,我需要查看Heroku日志中描述的日志文件

2014-03-23T04:32:21.431646+00:00 app[web.1]: This is pdfTeX, Version 3.1415926-2.4-1.40.13 (TeX Live 2012)
2014-03-23T04:32:21.431646+00:00 app[web.1]:  \write18 enabled.
2014-03-23T04:32:21.450999+00:00 app[web.1]: entering extended mode
2014-03-23T04:32:21.458053+00:00 app[web.1]: Completed 500 Internal Server Error in 124ms
2014-03-23T04:32:21.458309+00:00 app[web.1]: Completed 500 Internal Server Error in 124ms
2014-03-23T04:32:21.462550+00:00 app[web.1]: 
2014-03-23T04:32:21.462550+00:00 app[web.1]: ActionView::Template::Error (pdflatex failed: See /app/tmp/rails-latex/2--2591673647893672512/input.log for details):
2014-03-23T04:32:21.462550+00:00 app[web.1]:     8: \end{document}
2014-03-23T04:32:21.462550+00:00 app[web.1]:     7: 
2014-03-23T04:32:21.462550+00:00 app[web.1]:   app/views/layouts/menu.pdf.erbtex:9:in `_app_views_layouts_menu_pdf_erbtex___4209895480759438810_30701180'
2014-03-23T04:32:21.462550+00:00 app[web.1]:   app/controllers/restaurants_controller.rb:29:in `menu'
2014-03-23T04:32:21.463589+00:00 app[web.1]:     7: 
2014-03-23T04:32:21.463589+00:00 app[web.1]:     8: \end{document}
2014-03-23T04:32:21.462550+00:00 app[web.1]:     6: <%= yield %>
2014-03-23T04:32:21.462550+00:00 app[web.1]: 
2014-03-23T04:32:21.463589+00:00 app[web.1]:   app/views/layouts/menu.pdf.erbtex:9:in `_app_views_layouts_menu_pdf_erbtex___4209895480759438810_30701180'
2014-03-23T04:32:21.463589+00:00 app[web.1]: 
2014-03-23T04:32:21.462550+00:00 app[web.1]: 
2014-03-23T04:32:21.463589+00:00 app[web.1]:   app/controllers/restaurants_controller.rb:29:in `menu'
2014-03-23T04:32:21.463589+00:00 app[web.1]: 
2014-03-23T04:32:21.463589+00:00 app[web.1]: 
2014-03-23T04:32:21.463589+00:00 app[web.1]:     6: <%= yield %>
2014-03-23T04:32:21.463589+00:00 app[web.1]: ActionView::Template::Error (pdflatex failed: See /app/tmp/rails-latex/2--2591673647893672512/input.log for details):

但是由于没有保存对Heroku文件系统的更改,我无法查看input.log文件。有没有办法读取此文件或将其重定向到heroku日志?

1 个答案:

答案 0 :(得分:0)

您可以查看文件系统,但只知道它在dynos中会有所不同(如果您一直在编写文件),并且在重新启动dyno或部署应用程序时它会丢失。

要查看文件系统执行:

 heroku run bash

并且您应该被置于应用程序的bash提示符

相关问题