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.
我有奇怪的问题。在某个项目上运行后rails s,脚本挂起,没有输出也没有日志。如何调试它并检查发生了什么?我将 rvm 与 ruby 1.9.2 一起使用。
rails s
检查log/production.log 以查找最后执行的文件或代码行,并尝试找出问题所在。
log/production.log
如果您想更深入地挖掘,可以使用“strace”或“dtruss”等实用程序来查看正在打开的文件。
Linux: $ strace rails s Mac: $ sudo dtruss rails s
您可能不知道所有输出的含义,但您可能会知道是否缺少某些内容。