Basic Ember app not working with default adapter - ember.js

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?

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!

Related

Configure Ember CLI Mirage to support liverload for mirage configuration with Embroider

I have an Ember.js application, which uses Embroider and Ember CLI Mirage. Sadly live-reload is not working for Mirage configuration changes. A change to Mirage configuration does not trigger a rebuild. It seems as if mirage/ folder is not watched.
I reproduced this issue in a newly created Ember application using Ember CLI v4.1 with the --embroider flag. So it is not related to any special configuration of my application.
Do I need to configure Embroider somehow to watch mirage/ folder?
I think this probably related to: https://github.com/embroider-build/embroider/issues/972
and there could certainly be more documentation, but there was a similar issue with Docfy here: https://github.com/josemarluedke/docfy/issues/110
Does this work with mirage?:
EMBROIDER_REBUILD_ADDONS='ember-cli-mirage' ember s

All the routes not loaded in Ember js 1.11

I'm trying to migrate an ember application from 1.10 to 1.11.4 (I'm on the way to upgrade the ember to the latest version). When I have upgraded the ember version most of the routes are not initialized (some did). Error on the console says "The route ... was not found". Also if I check using ember inspector most of the routes are not there. Working fine with 1.10.
Quite new to ember, tried for couple of days without any luck.Need some help from some experienced ember guys.

EmberJS (without ember-cli) development behind firewall using systemjs or any other loader

I am planning to use EmberJS for a small application in my day job. I have used a little ember on my laptop using ember-cli. However at work I don't have access to Github.
I am planning to download the libraries and start using without any tools like npm, bower. I have tried to setup a static web app at https://github.com/mmrath/ember-standalone
There is not much code in there. I have tried to keep the structure as close to ember-cli as possible, os that it will be easier for me to upgrade to ember-cli when access is available. I would like to use ES6 modules like in ember-cli. However the fist step of loading the Ember is not working.
Error I see in chrome console is
Error: http://localhost:4200/vendor/ember/ember.debug.js detected as System.register but didn't execute.

How can I get the ember 'simple-auth' mixins imported into my Routes & Controllers?

I'm working on adding 'ember-simple-auth' to an EAK/grunt-based ember app, upgraded to ember 1.10. Bower is pulling in the latest 'simple-auth.js', not the old 'ember-simple-auth.js' version which the 'ember app kit simple auth' example uses. The component seems to be registered with Ember OK, since if I include the js file in index.html, I get a warning that it's already registered. One of the most basic things to do in getting started with simple-auth is to import the ApplicationRouteMixin into the ApplicationRoute, but I get 'module is not defined' or 'cannot be found'. I've tried many versions of syntax which I've seen in examples and blogs. Like 'import ApplicationRouteMixin from 'simple-auth/mixins/application-route-mixin' with ApplicationRouteMixin or SimpleAuth.ApplicationRouteMixin or Ember.SimpleAuth.ApplicationRouteMixin. Marco suggests I may need to load 'simple-auth.amd', since EAK-based apps transpile ES6 modules to AMD for loading in today's browsers. But I thought Ember Resolver handles that. I don't know how to set the grunt build to export one module over another. The old version adds the component to the namespace with 'Ember.SimpleAuth = Ember.Namespace.create', but the new versions don't have that syntax. How can I get the ember 'simple-auth' mixins imported into my Routes & Controllers?
I also tried dropping the separate mixin files into the project and was able to import/reference them that way but then there was an error about beforeModel needs to call _super so this because an uphill battle with no support or documentation so I had to give up on it. Both of my ember projects are upgraded to the latest Ember and jQuery so now am working on migrating them to CLI, then will revisit simple-auth again, since that's the only approach which might work.

How to get ember.js module work in play framework

I developed a little web app and now I'm trying ti merge the server-side code deployed under Play! framework with my client-side code made with Ember.js.
I found this module https://github.com/krumpi/play-emberjs
on Play! web site but I can't get it to work, it gives me this error
sbt.ResolveException: unresolved dependency: com.ketalo.play.plugins#emberjs;0.4.0-SNAPSHOT: not found
Does anybody know how to fix it?
Thanks.
If you are using ember rc6 than you need to define the right snapshot.
As stated in the docs:
version 0.4.0-SNAPSHOT Include support for ember.js 1.0 rc6
for ember rc6 you will need snapshot 0.4.0. But the error you get is suggesting that you are using snapshot 0.1.0
Hope it helps.
There is a mistake in the samples
The plugins.sbt needs to include a reference to the sonatatype repository:
// Repository for sonata snapshots
resolvers += "Sonatype snapshots" at "http://oss.sonatype.org/content/repositories/snapshots/"