# Basic functionality with Fixtures

**URL:** <https://discuss.emberjs.com/t/basic-functionality-with-fixtures/7207>\
**Category:** Ember Data\
**Created:** [February 1, 2015, 1:31pm UTC](https://discuss.emberjs.com/t/basic-functionality-with-fixtures/7207 "2015-02-01T13:31:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianllamar](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/brianllamar/32/9870_2.png) [@brianllamar](https://discuss.emberjs.com/u/brianllamar)\
**Post date:** [February 1, 2015, 1:31pm UTC](https://discuss.emberjs.com/t/basic-functionality-with-fixtures/7207/1 "2015-02-01T13:31:24Z")

</div>

Is there a basic tutorial or guide on using Ember fixtures? I have gone through the [tilde training](http://www.tilde.io/events/introduction-to-ember-online/) but it drops right in the middle of a project and I am trying to start from Ember new following the same conventions taught in the course.

Posted on [S/O](http://stackoverflow.com/questions/28263220/fixture-file-not-found-in-ember-project)

**error received** : `File: project-voice/routes/application.js ENOENT, no such file or directory '/Users/../tmp/tree_merger-tmp_dest_dir-VUc8t50a.tmp/models/speaker-fixtures.js'`

Is there something I am missing that will help ember find my fixture file? This is my first attempt in creating an app outside a tutorial and I am a bit lost. \*I also tried setting up the fixture in the model how it explains in the [embercli doc](http://www.ember-cli.com/#mocks-and-fixtures) and could not get that work.

Any push in the right direction would help tremendously. Thanks

---

<div class="post-metadata">

**Author:** ![startup](https://avatars.discourse-cdn.com/v4/letter/s/e19adc/32.png) [@startup](https://discuss.emberjs.com/u/startup)\
**Post date:** [February 1, 2015, 2:57pm UTC](https://discuss.emberjs.com/t/basic-functionality-with-fixtures/7207/2 "2015-02-01T14:57:55Z")

</div>

> **[Fixture Adapters - Ember.js With No Server - SitePoint](https://www.sitepoint.com/fixture-adapters-ember-js-server/)**
>
> This article explains how Ember's fixture adapters can be used to provide mock server data, speeding up development time.

> <https://stackoverflow.com/questions/23839551/where-is-fixture-data-in-ember-js-with-cli>

[http://emberjs.com/guides/models/the-fixture-adapter/](http://emberjs.com/guides/models/the-fixture-adapter/)[http://emberjs.com/guides/getting-started/using-fixtures/](http://emberjs.com/guides/getting-started/using-fixtures/)

This should get you on the right track. The only difference would be modifying old syntax slightly from 'app. …Adapter.extend to the newer …

'import Ember from ‘ember’;

export default ember.fixtureAdapter.extend ({

// Fixture code from those articles goes here…

})

You should be using ember-cli which automates the creation of this file/start code with… ‘ember g adapter ’ then add ‘Fixture’ to the generated code. It can be specified from the initial ‘ember g’ command I just forget.

1. http mock servers are superior to Fixture adapters due to a more close resemblance of actual production code eventually required.  
Just run ember g http-mock and then insert data in JSON format in the generated folder =\> Server/mocks/resource.js on line 7 between the brackets. I believe that requires an adapter… ‘ember g adapter application’ and insertion of =\>

export default… {

namespace: ‘api’

}

Its worthwhile familiarizing yourself w/ process of adding the ‘Model Hook’ on the route.js file from each resource you use with an API… easy to do and a constant on most apps.

-emberwatch.com -emberweekly.com -ember-cli 101 -Adolfo -developing an Ember.js edge - Matt Beale n friends -Codeschool course - warming up with ember -+100 bloggers who do app/feature implementation write-ups …

Good Luck

---

<div class="post-metadata">

**Author:** ![brianllamar](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/brianllamar/32/9870_2.png) [@brianllamar](https://discuss.emberjs.com/u/brianllamar)\
**Post date:** [February 1, 2015, 5:41pm UTC](https://discuss.emberjs.com/t/basic-functionality-with-fixtures/7207/3 "2015-02-01T17:41:14Z")

</div>

I ended up using a relative path and it worked: `import '../models/speaker-fixtures';`

But this is all great info. Especially http mock servers, I will keep this in mind for my next app.
