# Precompiled assets across multiple production servers

**URL:** <https://meta.discourse.org/t/precompiled-assets-across-multiple-production-servers/17940>\
**Category:** Self-hosting\
**Tags:** hosting\
**Created:** [2014年七月23日 12:18 UTC](https://meta.discourse.org/t/precompiled-assets-across-multiple-production-servers/17940 "2014-07-23T12:18:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![timdawborn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/timdawborn/32/105190_2.png) [@timdawborn](https://meta.discourse.org/u/timdawborn)\
**Post date:** [2014年七月23日 12:18 UTC](https://meta.discourse.org/t/precompiled-assets-across-multiple-production-servers/17940/1 "2014-07-23T12:18:15Z")

</div>

Question about precompiled assets on a multi-server production environment. The sprockets `require_tree` instruction does not define any ordering of its inclusions. On our two servers running identical code and identical versions of gems etc (same AWS AMI), the precompiled asset fingerprint is different due to the undefined nature of file system ordering.

I’m not a rails person normally so I have no intuition as to how people get around this problem normally. The `require_directory` sprockets command includes in lexicographical order, but does not recurse.

How is one meant to get around this problem for Discourse? Or is this not a problem and I have just misconfigured something incorrectly.

TIA!

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2014年七月23日 12:23 UTC](https://meta.discourse.org/t/precompiled-assets-across-multiple-production-servers/17940/2 "2014-07-23T12:23:01Z")

</div>

We build a docker image precompile in it and distribute to multiple machines

---

<div class="post-metadata">

**Author:** ![timdawborn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/timdawborn/32/105190_2.png) [@timdawborn](https://meta.discourse.org/u/timdawborn)\
**Post date:** [2014年七月23日 12:25 UTC](https://meta.discourse.org/t/precompiled-assets-across-multiple-production-servers/17940/3 "2014-07-23T12:25:09Z")

</div>

Right, I see. How does the rails community get around this problem if they’re not using docker? Specify all folders with `require_directory` instead of `require_tree`?
