详细输出来自rake资产:预编译 [英] Verbose Output From rake assets:precompile

查看:130
本文介绍了详细输出来自rake资产:预编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用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.

  1. Use the --trace flag

    $ heroku run rake assets:precompile --trace

  2. Set the log to use STDOUT in production.rb:

    config.logger = Logger.new(STDOUT)

这篇关于详细输出来自rake资产:预编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆