1

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

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

有任何想法吗?

谢谢

4

3 回答 3

2

尝试在本地预编译资产。

bundle exec rake assets:precompile

在 Heroku 上也config.assets.initialize_on_precompile必须设置为 false。

有关更多信息,请参阅Rails 指南

于 2013-04-13T05:49:21.283 回答
0

命令不是 git push heroku master 吗?

于 2013-04-14T02:27:05.340 回答
0

我的回答:问题出在属性中的非 ascii char 中,本地编译很好,但在 heroku 上没有。底线 -仅使用 ascii

于 2013-04-14T13:49:37.270 回答