Ruby on rails 如何调试Heroku上的“错误检测资产:预编译任务”问题
当推到Heroku时,我们在输出中看到以下行:Ruby on rails 如何调试Heroku上的“错误检测资产:预编译任务”问题,ruby-on-rails,debugging,heroku,Ruby On Rails,Debugging,Heroku,当推到Heroku时,我们在输出中看到以下行: ... Error detecting the assets:precompile task ... 然后应用程序将成功部署,但不会有任何资产 这令人难以置信地沮丧,因为没有出现错误,我们也不知道会发生什么。日志没有任何提示 这是推送的终端输出的尾部: Your bundle is complete! It was installed into ./vendor/bundle Cleaning up the bundl
...
Error detecting the assets:precompile task
...
然后应用程序将成功部署,但不会有任何资产
这令人难以置信地沮丧,因为没有出现错误,我们也不知道会发生什么。日志没有任何提示
这是推送的终端输出的尾部:
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
Error detecting the assets:precompile task
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby/Rails -> console, rake, web, worker
-----> Compiled slug size: 54.8MB
-----> Launching... done, v15
http://myapp-1234.herokuapp.com deployed to Heroku
Sep 29 09:07:32 myapp-1234 heroku/slug-compiler: Slug compilation started
Sep 29 09:07:54 myapp-1234 heroku/api: Release v15 created by me@example.com
Sep 29 09:07:56 myapp-1234 heroku/slug-compiler: Slug compilation finished
Sep 29 09:08:00 myapp-1234 heroku/web.1: Process exited with status 143
Sep 29 09:08:00 myapp-1234 heroku/web.1: Starting process with command `bin/rails server -p 18025 -e staging`
Sep 29 09:08:04 myapp-1234 app/web.1: [2013-09-29 16:08:04] INFO WEBrick 1.3.1
Sep 29 09:08:05 myapp-1234 app/web.1: [2013-09-29 16:08:04] INFO ruby 2.0.0 (2013-06-27) [x86_64-linux]
Sep 29 09:08:05 myapp-1234 app/web.1: [2013-09-29 16:08:04] INFO WEBrick::HTTPServer#start: pid=2 port=18025
Sep 29 09:08:05 myapp-1234 heroku/web.1: State changed from starting to up
以下是整个推送过程中完整的书面记录输出:
Your bundle is complete! It was installed into ./vendor/bundle
Cleaning up the bundler cache.
-----> Writing config/database.yml to read from DATABASE_URL
Error detecting the assets:precompile task
-----> Discovering process types
Procfile declares types -> (none)
Default types for Ruby/Rails -> console, rake, web, worker
-----> Compiled slug size: 54.8MB
-----> Launching... done, v15
http://myapp-1234.herokuapp.com deployed to Heroku
Sep 29 09:07:32 myapp-1234 heroku/slug-compiler: Slug compilation started
Sep 29 09:07:54 myapp-1234 heroku/api: Release v15 created by me@example.com
Sep 29 09:07:56 myapp-1234 heroku/slug-compiler: Slug compilation finished
Sep 29 09:08:00 myapp-1234 heroku/web.1: Process exited with status 143
Sep 29 09:08:00 myapp-1234 heroku/web.1: Starting process with command `bin/rails server -p 18025 -e staging`
Sep 29 09:08:04 myapp-1234 app/web.1: [2013-09-29 16:08:04] INFO WEBrick 1.3.1
Sep 29 09:08:05 myapp-1234 app/web.1: [2013-09-29 16:08:04] INFO ruby 2.0.0 (2013-06-27) [x86_64-linux]
Sep 29 09:08:05 myapp-1234 app/web.1: [2013-09-29 16:08:04] INFO WEBrick::HTTPServer#start: pid=2 port=18025
Sep 29 09:08:05 myapp-1234 heroku/web.1: State changed from starting to up
太好了,我们什么也没学到
在Heroku编译过程中,我们可以做些什么来调试错误?我想知道为什么Heroku会启动WEBrick…无论如何,你的应用程序是否正常工作?它说它的状态是上升的。您的Procfile看起来像什么?Heroku通常非常擅长在编译过程中吐出错误。你应该可以看到你推送到heroku master的日志。另外,看看这个@Leo-Per链接,我们并没有试图清除任何默认的rake任务,所以不要认为这个解决方案会apply@Leo-我更新了我的问题-该应用程序实际上一直工作,只是从来没有资产。根据其他事项:我没有使用procfile,Heroku默认启动WEBrick,并且日志中没有任何内容-这就是问题所在。当运行Heroku运行rake-T时,您看到rake任务了吗?