# Missing assets in production

**URL:** https://meta.discourse.org/t/missing-assets-in-production/51198
**Category:** Development
**Created:** [2016年十月6日 23:08 UTC](https://meta.discourse.org/t/missing-assets-in-production/51198 "2016-10-06T23:08:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sevenmaxis](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@sevenmaxis](https://meta.discourse.org/u/sevenmaxis)
#### Post date: [2016年十月6日 23:08 UTC](https://meta.discourse.org/t/missing-assets-in-production/51198/1 "2016-10-06T23:08:51Z")

</div>

I’m developing under vagrant. To resolve problem with plugin I need to run project in production environment.  
I’ve setup production database, precompiled assets and etc. But assets are not available.

```
GET http://localhost:4000/assets/locales/en-804ed863fc64c411df3e2c34601396de651ac49b36c280044a57afdd8c530130.js 
(index):43 GET http://localhost:4000/assets/ember_jquery-fd1152747e1d8d273f929f46a9de5fcbd1aeaf4d6f102306216787b3b29b41c2.js 
(index):44 GET http://localhost:4000/assets/preload-store-8f2c6a229e802a79c2fdcad50fd4be24b48ae5ea509967a9c04ea1505fec45a4.js 
(index):45 GET http://localhost:4000/assets/vendor-b2e884ad30ed6971a659ed1b04572cb5645a31a7d226dbf6ffaa1658201ea452.js 
(index):46 GET http://localhost:4000/assets/pretty-text-bundle-7f6667577c3caba87c12a26f913649744ed32f2c0e16f4e7778a8563ecfd8e11.js 
(index):47 GET http://localhost:4000/assets/application-266552f6665a9044fc1b5bedd130662b2ae131d32d2247233bf07bc13d34c9c2.js 
(index):153 Uncaught ReferenceError: require is not defined(anonymous function) @ (index):153(anonymous function) @ (index):161
(index):167 Uncaught ReferenceError: Ember is not defined(anonymous function) @ (index):167
(index):180 Uncaught ReferenceError: require is not defined(anonymous function) @ (index):180(anonymous function) @ (index):193
(index):196 GET http://localhost:4000/assets/browser-update-bfd8d36f8afbc3c7eab69f8d69878f97851c57a2cae626aa38c6c2563a716732.js 404 (Not Found)

```

What might be a problem here?

---

<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: [2016年十月7日 00:50 UTC](https://meta.discourse.org/t/missing-assets-in-production/51198/2 "2016-10-07T00:50:30Z")

</div>

precompile your assets…

```plaintext
RAILS_ENV=production bin/rake assets:precompile

```

---

<div class="post-metadata">

### Author: ![sevenmaxis](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@sevenmaxis](https://meta.discourse.org/u/sevenmaxis)
#### Post date: [2016年十月7日 09:24 UTC](https://meta.discourse.org/t/missing-assets-in-production/51198/3 "2016-10-07T09:24:04Z")

</div>

> [@sam](#):
>
> RAILS\_ENV=production bin/rake assets:precompile

Already done, I can see these assets in `public/assets` folder, but they are not accessible from site.

```
vagrant@discourse:/vagrant/public/assets$ l
admin/
admin-0b5f3103e39b430afbea63008b61940145c90ccc21c21c029e5aa70a8cca552c.css
admin-0b5f3103e39b430afbea63008b61940145c90ccc21c21c029e5aa70a8cca552c.css.gz
admin-649952ed232495461c925de0a2d8e812c0118b61a536f84b955b26ced2b7c7d5.js
admin-649952ed232495461c925de0a2d8e812c0118b61a536f84b955b26ced2b7c7d5.js.gz
application-266552f6665a9044fc1b5bedd130662b2ae131d32d2247233bf07bc13d34c9c2.js
application-266552f6665a9044fc1b5bedd130662b2ae131d32d2247233bf07bc13d34c9c2.js.gz
...

```

---

<div class="post-metadata">

### Author: ![sevenmaxis](https://avatars.discourse-cdn.com/v4/letter/s/bbe5ce/32.png) [@sevenmaxis](https://meta.discourse.org/u/sevenmaxis)
#### Post date: [2016年十月8日 13:43 UTC](https://meta.discourse.org/t/missing-assets-in-production/51198/4 "2016-10-08T13:43:34Z")

</div>

The problem was with the rails’ serving static files configuration:

`config.serve_static_files = true`
