1

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 .

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks, i'll give the ember:install a go next time. It's sometimes a bit obscure as to what is available in which gem. The benefit of downloading the .js libs and putting them in /vendor/assets/javascript is that I know exactly what I have
0

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/

4 Comments

Thanks, now I can continue tonight. I was expecting master to always have a working deliverable. Guess I shouldn't expect that.
Still struggling. If I add 'match('/').to('application');' in the Basis.Router body I get the next error, match is undefined.
Match is no longer a valid syntax for refining routes. You will need something like: App.Router.map(function() { this.route('application', { path: '/'}); }); You can see my example at: github.com/seankeating/ember-js-example/blob/master/app/… New documentation at: emberjs.com/guides/routing/defining-your-routes
wow, things don't only change, they change super fast. Thanks for your help again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.