2
votes

Here is the source code.

I'm running Ember-CLI from the master branch of the git repo (currently version 2.2.0-beta.1-master-e803ac7fa6) and linking via npm. This should be using versions 2.2.0 of Ember and Ember Data. In the middle of the basic tutorial, I hit an issue with Mirage and Ember Data. Without explicitly creating an application adapter, the app fails. There is a 404 error being thrown on the route that should be handled by Mirage, as well as numerous Adapter errors. No errors are shown during ember serve.

In trying to fix this, I ran into another issue. After running ember g adapter application, the app loaded in the browser but there was still an error because this generated a RESTAdapter instead of the preferred JSONAPIAdapter. After manually switching to the JSONAPIAdapter, everything is fine.

Is this an issue with Ember-CLI still using an old version of Ember Data somehow? Update: @Michael and @Gaurav found the issue with Ember-CLI. See his answer for the Github issue link.

The original question still stands, though. Should Ember be able to function without explicitly creating an adapter?

1
Please open an issue with ember-cli and ember-cli-mirage. Thank you.Gaurav
I was already posting on an issue for the Ember guides. I was told to create a question here. The problem doesn't seem to lie with ember-cli-mirage, so I won't post there. There are currently 233 open issues on ember-cli as they try to figure out how to convert to 2.0, so I won't add to the cacophony.0dyss3us

1 Answers

1
votes

This is a bug with Ember CLI 2.2.0-beta.1 - it's using the wrong adapter type by default. Can you open an issue on Ember CLI? Thanks!