# EmberCLI - using pods - quite confusing

**URL:** <https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384>\
**Category:** Ember CLI\
**Created:** [July 14, 2015, 11:26am UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384 "2015-07-14T11:26:37Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkconn](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mkconn](https://discuss.emberjs.com/u/mkconn)\
**Post date:** [July 14, 2015, 11:26am UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/1 "2015-07-14T11:26:37Z")

</div>

So I was trying to setup using pods as written in the ember-cli docs - by setting the podModulePrefix to ‘my-appname/pods’ . Turns out that generating a route for instance works nice - its put into the pods directory. But running the app does not include stuff from the pods directory. When I put everything on the app root it works. Over on github I found this discussion where pods directory will be removed totally, everything should be put under the app root directory (quite dumb , if you have lots of stuff… ). On the other hand I find threads in forums where it says: ‘yeh, putting stuff into pods directory just works fine’ … so… what should I now believe in? In the end its not working for me, its frustrating as always (working with ember now since a few months) to get stuff running ‘the right way’, whereas there is no right way because everything is changing and docs are old and also tutorials and so on…

---

<div class="post-metadata">

**Author:** ![ajgordo](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/ajgordo/32/11089_2.png) [@ajgordo](https://discuss.emberjs.com/u/ajgordo)\
**Post date:** [July 14, 2015, 11:50am UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/2 "2015-07-14T11:50:40Z")

</div>

Can I ask what you mean by “stuff”? I am using pods successfully and have set a podModulePrefix without issue, but perhaps I’m not using the type of object you are.

The one thing I did find is that in addons you just put “pods” as the podModulePrefix and in an application you use “/pods” where is the same as the modulePrefix you have set.

---

<div class="post-metadata">

**Author:** ![mkconn](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mkconn](https://discuss.emberjs.com/u/mkconn)\
**Post date:** [July 14, 2015, 11:58am UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/3 "2015-07-14T11:58:36Z")

</div>

Sure, you can ask 😉 . Sorry for not being to specific…

ember-cli: 1.13.1 ember: 1.13.3 ember-data: 1.13.5

The environment.js (tried with frontend/pods and just /pods:

```
modulePrefix: 'frontend',
podModulePrefix: 'frontend/pods',

```

The directory structure:

```
app
app/adapters
app/helpers
app/models
app/pods
app/pods/index
app/pods/index/route.js
app/pods/index/template.hbs
app/pods/events
app/pods/events/index/route.js
app/pods/events/index/template.js
app/pods/events/edit/route.js
app/pods/events/edit/template.js
// and some more of that 'stuff'

```

Another thing to note is, that the resolver log does not give a hint, that he tries to lookup in the pods directory…

---

<div class="post-metadata">

**Author:** ![kylecoberly](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kylecoberly/32/15828_2.png) [@kylecoberly](https://discuss.emberjs.com/u/kylecoberly)\
**Post date:** [July 14, 2015, 5:14pm UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/4 "2015-07-14T17:14:29Z")

</div>

Supposedly it has worked for someone, somewhere, but podModulePrefix has never worked for me. There is a [proposal](https://github.com/ember-cli/ember-cli/issues/3424) to remove it entirely, and the smart money is on that going through at some point. If you have lots of stuff, you’ll either have lots of stuff in the pods directory or lots of stuff in the app directory. If you’re truly sticking with pods, /app won’t have much else in it. A much more sane approach to using pods is to add `usePods: true` to the `.ember-cli` file in the root directory. After that, all your generator commands will use pods.

---

<div class="post-metadata">

**Author:** ![mkconn](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mkconn](https://discuss.emberjs.com/u/mkconn)\
**Post date:** [July 14, 2015, 5:37pm UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/5 "2015-07-14T17:37:47Z")

</div>

I did add usePods and it works for the generators but not when the resolver is trying to put all the template stuff together… so usePods or --pods while generating is not really the problem…

---

<div class="post-metadata">

**Author:** ![kylecoberly](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kylecoberly/32/15828_2.png) [@kylecoberly](https://discuss.emberjs.com/u/kylecoberly)\
**Post date:** [July 14, 2015, 6:04pm UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/6 "2015-07-14T18:04:28Z")

</div>

Oh! That’s unusual. Can you post up a representative sample of your file tree?

---

<div class="post-metadata">

**Author:** ![mkconn](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@mkconn](https://discuss.emberjs.com/u/mkconn)\
**Post date:** [July 15, 2015, 7:43am UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/7 "2015-07-15T07:43:31Z")

</div>

Okay… I understood now, that I would not need folders like ‘adapters’ or ‘services’ etc anymore, so I don’t think the app-folder will be a total mess because I can put the current adapter into application/adapter.js and so on… So… finally I think that a pods folder and podModulePrefix is not needed really and I’m going to follow whats suggested … What I can say about working with ember is… it does not become boring 😉

---

<div class="post-metadata">

**Author:** ![kylecoberly](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kylecoberly/32/15828_2.png) [@kylecoberly](https://discuss.emberjs.com/u/kylecoberly)\
**Post date:** [July 15, 2015, 2:23pm UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/8 "2015-07-15T14:23:48Z")

</div>

Bingo! That said, a caveat: Most Ember objects are plural, but models and model-specific-adapters are singular. This can lead to having pods like “posts” AND “post”, “comments”, AND “comment,” etc. For that reason, you’ll see people override `usePods` by passing the `--pod` flag\* when you’re creating models or model-specific-adapters to keep them in the models folder.

\* `--pod` just inverts whatever the `usePods` option is currently set to. So, if it’s `true`, `ember g model modelName --pod` will put the model in a non-pod structure

---

<div class="post-metadata">

**Author:** ![Bob\_Myers](https://avatars.discourse-cdn.com/v4/letter/b/bc79bd/32.png) [@Bob\_Myers](https://discuss.emberjs.com/u/Bob_Myers)\
**Post date:** [July 20, 2015, 3:28am UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/9 "2015-07-20T03:28:17Z")

</div>

> [@kylecoberly](#):
>
> lots of stuff

If you have “lots of stuff” it most likely means your app is structured poorly–it’s too “flat”. It you have “lots of stuff” then even if you create a pods directory it will still be too full of things. I switched away from pods and never looked back.

Models are obviously related to routes and pods, but in some sense they are orthogonal. There might be models with no routeable logic, and there might be multiple pieces of routeable logic related to one model. Therefore, aside from the pluralization issue, it makes sense to me to keep models in a separate models directory. Having said that, in my node app, I have chosen to include models in the same directory with routes and controllers, and I use singular form for everything, which works just fine.

---

<div class="post-metadata">

**Author:** ![Kilowhisky](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kilowhisky/32/17044_2.png) [@Kilowhisky](https://discuss.emberjs.com/u/Kilowhisky)\
**Post date:** [July 22, 2015, 6:10am UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/10 "2015-07-22T06:10:58Z")

</div>

My take on pods is it is perfect for use with hierarchical types of classes. Router, controllers, templates, and sometimes components can all be represented as such easily.

---

<div class="post-metadata">

**Author:** ![huskerdu](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/huskerdu/32/11035_2.png) [@huskerdu](https://discuss.emberjs.com/u/huskerdu)\
**Post date:** [August 1, 2015, 7:24am UTC](https://discuss.emberjs.com/t/embercli-using-pods-quite-confusing/8384/11 "2015-08-01T07:24:36Z")

</div>

Pods is definitely something worthy in organizing files. Am okay with the file structure and I just make my routes.js file reveal the structure of my app.
