# Stable branch assets won't compile

**URL:** <https://meta.discourse.org/t/stable-branch-assets-wont-compile/29656>\
**Category:** Product Support\
**Created:** [04.Июнь.2015 16:18:57 UTC](https://meta.discourse.org/t/stable-branch-assets-wont-compile/29656 "2015-06-04T16:18:57Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![brahn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brahn/32/109267_2.png) [@brahn](https://meta.discourse.org/u/brahn)\
**Post date:** [12.Июнь.2015 13:58:00 UTC](https://meta.discourse.org/t/stable-branch-assets-wont-compile/29656/5 "2015-06-12T13:58:00Z")

</div>

> [@neil](#):
>
> The db migrations happen first, so the “stylesheet\_cache” table should have been found.

I am hitting a similar problem and if I understand correctly it seems this is specific to multisite configuration. For multisite the `multisite:migrate` occurs in the hook `after_bundle_exec` but the `assets:precompile` is trying to do its thing for each db configured. Meaning, for multisite the db migrations are actually happening after the asset compilation.

> <https://github.com/discourse/discourse/blob/9ce66038647bc4ff63167fe9c74857a01acc0875/lib/tasks/assets.rake#L76>

At least that is my guess!

The best solution I could think of was to edit web.template.yml to perform the `multisite:migrate` directly prior to `assets:precompile`. This works for me temporarily at least.

---

_[View the full topic](https://meta.discourse.org/t/stable-branch-assets-wont-compile/29656)._
