繁体   English   中英

Heroku编译资产超时

[英]Heroku compile assets timeout

从今天开始,我在资产编译方面遇到超时异常:

git push heroku
...
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
       Running: rake assets:precompile
/app/slug-compiler/lib/utils.rb:67:in `block (2 levels) in spawn': command='/app/slug-compiler/lib/../../tmp/buildpacks/ruby/bin/compile /tmp/build_nnx3b7xhbc6j /app/tmp/repo.git/.cache' exit_status=0 out='' at=timeout elapsed=900.1050653457642 (Utils::TimeoutError)
        from /app/slug-compiler/lib/utils.rb:53:in `loop'
        from /app/slug-compiler/lib/utils.rb:53:in `block in spawn'
        from /app/slug-compiler/lib/utils.rb:48:in `popen'
        from /app/slug-compiler/lib/utils.rb:48:in `spawn'
..

更新:

heroku[api]: Starting process with command `bundle exec rake assets:precompile` by
heroku[api]: Starting process with command `bundle exec rake assets:precompile`
heroku[run.7870]: Awaiting client
heroku[run.7870]: Error R13 (Attach error) -> Failed to attach to process
heroku[run.7870]: State changed from starting to complete
heroku[run.7870]: Process exited with status 128
heroku[slugc]: Slug compilation started 
heroku[slugc]: Slug compilation failed: failed to compile Ruby/rails app

有任何想法吗?

谢谢

尝试在本地预编译资产。

bundle exec rake assets:precompile

同样,必须在Heroku上将config.assets.initialize_on_precompile设置为false。

有关其他信息,请参见《 Rails指南 》。

git push heroku master不是命令吗?

我的回答:问题出在属性中的非ascii字符中,本地编译正常,但在heroku上则不然。 底线- 仅使用ascii

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM