1

When pushing to Heroku, we're seeing the following line in the output:

...
Error detecting the assets:precompile task
...

The app will then successfully deploy, but it won't have any assets.

This is incredibly frustrating, because no error is raised, and we don't have a clue what might be going on. The logs don't hint to anything.

Here's the tail of the terminal output for the push:

       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

Here's the complete papertrail log output throughout the push:

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

Great- we learned nothing.

What can we do to debug errors during Heroku compilation?

Yarin
  • 173,523
  • 149
  • 402
  • 512
  • I'm wondering why heroku is starting WEBrick up...In any case is your app working? It says that the state of it is up. What does your Procfile look like? Heroku is usually pretty good at spitting out errors during compilation. You should see the logs from where you pushed to heroku master. – Leo Correa Sep 29 '13 at 15:10
  • Also, take a look at this https://github.com/heroku/heroku-buildpack-ruby/issues/125 – Leo Correa Sep 29 '13 at 15:12
  • @Leo- Per the link, we're not trying to clear any default rake tasks, so don't think that solution will apply – Yarin Sep 29 '13 at 15:24
  • @Leo- I updated my question- the app actually always works, it just never has assets. Per the other things: I'm not using a procfile, Heroku starts up WEBrick by default, and there's nothing in the logs- which is the problem. – Yarin Sep 29 '13 at 16:15
  • Do you see the rake task when you run `heroku run rake -T`? – Leo Correa Sep 29 '13 at 20:55
  • Yes, it's there. I just tried to run it, and it seemed to run fine. But then I tried navigating to the app (and restarting) and it *still* serves no assets! – Yarin Sep 29 '13 at 21:15
  • you might need to restart the server. Try doing `heroku restart` after that. – Leo Correa Sep 29 '13 at 22:38

0 Answers0