本文介绍了详细输出来自rake资产:预编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我刚开始使用asset_sync gem,并且我的资产似乎被无序编译,Sass文件无法访问其他Sass文件中定义的变量。真正帮我缩小问题的范围是能够准确看到预编译过程中发生了什么,但是 rake资源:预编译和 heroku run rake assets:precompile 似乎没有提供详细的选项。我得到的是一些更高级别的输出,后面跟着一个 rake aborted!和一个堆栈跟踪。 Tailing Heroku日志并没有给我带来任何好处,所以我怎样才能在Heroku资产预编译期间得到更详细的日志? 解决方案 结果发现下面的组合可以让你更快一些。当一个文件被预编译时,你会得到输出,但不是因为它正在被预编译,所以如果它挂起,你就看不到它被阻塞了。 使用--trace标志 $ heroku运行rake资产:precompile --trace config.logger = Logger.new(STDOUT) I've just started using the asset_sync gem and my assets seem to be being compiled out of order, with Sass files unabled to access variables defined in other Sass files. What would really help me narrow down the issue is being able to see exactly what is going on during precompilation, but both rake assets:precompile and heroku run rake assets:precompile doesn't seem to offer a verbose option. All I get is some higher level output followed by a rake aborted! and a stack trace. Tailing heroku logs gets me nothing, so how can I get a more detailed log of what is going on during asset precompilation on Heroku? 解决方案 Turns out a combination of the following gets you some more verbocity. You get output when a file is precompiled, but not as it is being precompiled, so if it hangs you can't see what it's choked on.Use the --trace flag$ heroku run rake assets:precompile --traceSet the log to use STDOUT in production.rb:config.logger = Logger.new(STDOUT) 这篇关于详细输出来自rake资产:预编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 09-05 04:32