Detect rails 4 manifest file #74

merged 2 commits into from Apr 22, 2013

10 participants


This patch implements #72 and checks for the manifest file generated by Rails 4 to detected if assets are already compile.


👍 @hone WDYT?


+1 I experienced this too






Yo @ctshryock, we added tests 😄 any chance you could make a rails 4 repo, add it to and add a test for this?


Yesssss I'll start on that

pat commented Apr 7, 2013

Just because I'm curious (and thinking of doing something similar for Flying Sphinx): why georgewashington?


@schneems updated with passing spec, thanks for fixing that Hachet issue


When will this be released?



I found this issue via:

Heroku was compiling the assets to /tmp but not serving them. As a workaround, setting config.serve_static_assets = true in production.rb worked for us.


Merging, tests pass for me after @dpiddy last PR. Won't be live till @hone deploys

@schneems schneems merged commit 5abb81d into heroku:master Apr 22, 2013

| (• ◡•)|/ \(❍ᴥ❍ʋ)


Is this now live? I can't push my Rails 4 app up due to constant errors precompiling the assets, and it doesn't detect the already precompiled ones at the moment.


Thanks; just checking I hadn't broken anything else :)


@robotmay I believe you can manually specify this git repo as your buildpack and use it directly, that will get you this patch. User beware as it's not officially released yet etc etc

$ heroku config:set BUILDPACK_URL=

I wouldn't recommend this long term though, but should get you past your current hangups.


@ctshryock Ooh, thanks for the tip. I actually managed to get it deployed by enabling a labs feature to inject the production environment when precompiling or somesuch, which got me far enough for now :D


I ran the "heroku config:set" command and redeployed the app, but my assets are still not showing up.

-----> Fetching custom git buildpack... done

----> Preparing app for Rails asset pipeline
   Running: rake assets:precompile
   I, [2013-05-09T12:23:53.985438 #1005]  INFO -- : Writing /tmp/build_3jxo5dbpowgh3/public/assets/application-75a7854682675193d462515d38e028bc.js
   I, [2013-05-09T12:23:59.206363 #1005]  INFO -- : Writing /tmp/build_3jxo5dbpowgh3/public/assets/application-6cb6545be1800ce4cbc7e163539ba4c4.css
   Asset precompilation completed (12.88s)

The static assets workaround did work for me, although it shows the same output during assets compilation.

Using Rails 4.0.0rc1 and ruby 2.0.0. (both local and on Heroku).


Strange, Worked For Me™:

fury git:master ❯ b rake assets:precompile                                                                                                            ✖ ✹ ✭

fury git:master ❯ git ci -a                                                                                                                           ⏎ ✖ ✚
[master dddfb9e] Change background color, precompile assets
 5 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 public/assets/manifest-3ed17881c51fa54c3ce51c6d17e42e00.json

fury git:master ❯ heroku config:set BUILDPACK_URL=
Setting config vars and restarting cts-fury... done, v3

fury git:master ❯ git push heroku master
[Counting objects: 95, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (87/87), done.
Writing objects: 100% (95/95), 189.57 KiB, done.
Total 95 (delta 15), reused 0 (delta 0)
remote: -----> Fetching custom git buildpack... done
remote: -----> Preparing app for Rails asset pipeline
remote:        Detected manifest file, assuming assets were compiled locally
remote: -----> Launching... done, v7
remote: deployed to Heroku

 * [new branch]      master -> master

That's what this pull request is about, detecting if the manifest files exists (meaning assets are already precompiled) and skipping that step on Heroku.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment