因为今天我在资产编译时遇到超时异常:
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
有什么想法吗?
由于
答案 0 :(得分:2)
尝试在本地预编译资产。
bundle exec rake assets:precompile
在Heroku上也必须将config.assets.initialize_on_precompile
设置为false。
有关其他信息,请参阅Rails Guides。
答案 1 :(得分:0)
是不是命令git push heroku master?
答案 2 :(得分:0)
我的回答:问题出在非ascii char in property,本地编译很好,但不是heroku。 底线 - 仅使用ascii