radar / guides

Guides for Ruby and Elixir and whatever else I feel like
1.52k stars 164 forks source link

Routing error in Chrome inspector during Ember guide #52

Closed thejonanshow closed 10 years ago

thejonanshow commented 10 years ago

When I open the Chrome inspector per the tutorial I should see this: https://github.com/radar/guides/blob/master/ember/chrome_console.png

I apparently have some sort of routing error and I don't know enough about Ember yet to debug it. So far I've cloned the repo, run the generator and made the application.js.coffee and blorgh.js.coffee changes.

router:main application.js?body=1:8
application:main application.js?body=1:8
DEBUG: ------------------------------- ember.js?body=1:3522
DEBUG: Ember      : 1.5.0 ember.js?body=1:3522
DEBUG: Ember Data : 1.0.0-beta.7+canary.f482da04 ember.js?body=1:3522
DEBUG: Handlebars : 1.3.0 ember.js?body=1:3522
DEBUG: jQuery     : 1.11.0 ember.js?body=1:3522
DEBUG: ------------------------------- ember.js?body=1:3522
store:main application.js?body=1:8
event_dispatcher:main application.js?body=1:8
router:main application.js?body=1:8
location:hash application.js?body=1:8
route:basic application.js?body=1:8
Attempting URL transition to / ember.js?body=1:3522
route:application application.js?body=1:8
route:application application.js?body=1:8
route:index application.js?body=1:8
Transition #0: application: calling beforeModel hook ember.js?body=1:3522
Transition #0: application: calling deserialize hook ember.js?body=1:3522
Transition #0: application: calling afterModel hook ember.js?body=1:3522
Transition #0: index: calling beforeModel hook ember.js?body=1:3522
Transition #0: index: calling deserialize hook ember.js?body=1:3522
model:post application.js?body=1:8
adapter:post application.js?body=1:8
adapter:application application.js?body=1:8
adapter:-rest application.js?body=1:8
serializer:post application.js?body=1:8
serializer:application application.js?body=1:8
serializer:-rest application.js?body=1:8
template:loading application.js?body=1:8
route:loading application.js?body=1:8
DEBUG: For more advanced debugging, install the Ember Inspector from https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi ember.js?body=1:3522
model:0 application.js?body=1:8
template:error application.js?body=1:8
route:error application.js?body=1:8
Error while loading route: Error: No model was found for '0'
    at new Error (native)
    at Error.Ember.Error (http://localhost:3000/assets/ember.js?body=1:911:19)
    at Ember.Object.extend.modelFor (http://localhost:3000/assets/ember-data.js?body=1:9806:33)
    at JSONSerializer.extend.extractArray (http://localhost:3000/assets/ember-data.js?body=1:3173:28)
    at superWrapper (http://localhost:3000/assets/ember.js?body=1:1293:16)
    at Ember.Object.extend.extractFindAll (http://localhost:3000/assets/ember-data.js?body=1:2381:21)
    at Ember.Object.extend.extract (http://localhost:3000/assets/ember-data.js?body=1:2366:37)
    at http://localhost:3000/assets/ember-data.js?body=1:10397:34
    at invokeCallback (http://localhost:3000/assets/ember.js?body=1:10014:19)
    at publish (http://localhost:3000/assets/ember.js?body=1:9684:9)
    at publishFulfillment (http://localhost:3000/assets/ember.js?body=1:10104:7) ember.js?body=1:3522
Transition #0: index: transition was aborted 
planet-argonbot commented 10 years ago

@1337807 Have you removed the old Rails application.js file from app/assets/javascripts?

thejonanshow commented 10 years ago

No, but the Blorgh application no longer has an application.js (it's now application.js.coffee): https://github.com/radar/blorgh/tree/ember/app/assets/javascripts

tomash commented 10 years ago

But the one in rails branch -- the one you begin with -- actually does have rails' original application.js: https://github.com/radar/blorgh/blob/rails/app/assets/javascripts/application.js which of course clashes with the .js.coffee one, so remove the .js one

thejonanshow commented 10 years ago

Turns out I'm a derp and didn't checkout the rails branch. Pardon the noise.