Question

I'm using ember-rails master and created a ember bootstrap project. Everything is empty and left as it was when creating, yet I'm running into the mentioned type error. when the router is entered. The namespace is known, but the router isn't. Has anybody seen this before?

For the sake of completeness I'll past what is there below:

Basis.ApplicationController = Ember.Controller.extend({

});

Basis.ApplicationRoute = Ember.Route.extend({

});

Basis.js:

//= require ./store
//= require_tree ./models
//= require_tree ./controllers
//= require_tree ./views
//= require_tree ./helpers
//= require_tree ./templates
//= require ./router
//= require_tree ./routes
//= require_self

Basis.Router.map(function(match) {

});

Basis.Store = DS.Store.extend({
  revision: 11
});

application.handlebars:

Application

<p>Your content here.</p>

{{outlet}}

application.js

//= require jquery
//= require jquery_ujs
//= require bootstrap
//= require handlebars
//= require ember
//= require ember-data
//= require_self
//= require basis
Basis = Ember.Application.create();
//= require_tree .
Was it helpful?

Solution 2

If you are using the latest from master from Ember-Rails then the problem is that the vendor files for ember are out of date. The Ember.js in Ember-Rails is at v1.0.pre-279-gb1c0b4c, and Ember-Data is at 4. In order to use the current documentation in your code you will need to updated a release of Ember.js and Ember-Data.

You can find a more recent EmberJS file here: EmberJS v1.0.0-pre.2-396-gddb0951 and Ember-Data: Ember-Data v11. Just rename them to match what you have now.

You can see your code with the updated Ember files here: http://jsfiddle.net/seankeating/ZRN23/7/

OTHER TIPS

Alternatively you can bundle ember-rails from master on github:

gem 'ember-rails', github: 'emberjs/ember-rails'

Then bundle install. Make sure you don't have any locally vendored versions of handlbars, ember.js, or ember-data hanging out.

Right now ember-rails master is at ember.js 1.0.0-pre4.

If you want to track ember.js and ember-data at master, you can also do this to vendor (in a way that doesn't conflict with ember-rails) them:

bundle exec rails g ember:install --head

This will install them at vendor/assets/ember.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top