admin管理员组文章数量:1332389
I created a small inventory app in Ember, and followed a tutorial on adding Rails 4 as a persistence layer: /
But now I am getting the following error in the console:
Assertion failed: You included Ember Data but didn't define App.Store
The pages load fine, and it renders my index.erb and application.html.erb, but I get nothing from my ember bits rendered.
I am at a bit of a loss on how to troubleshoot this issue. Can someone point me in the right direction?
Thanks!
Update: I am also getting this error:
Uncaught TypeError: Attempting to register an unknown factory: `store:main`
and I do have App.Store defined in store.js:
App.Store = DS.Store.extend({
adapter: DS.RESTAdapter.create()
});
I created a small inventory app in Ember, and followed a tutorial on adding Rails 4 as a persistence layer: http://pixelhandler./blog/2013/09/24/scaffold-for-a-browser-app-built-with-ember-js-and-rails/
But now I am getting the following error in the console:
Assertion failed: You included Ember Data but didn't define App.Store
The pages load fine, and it renders my index.erb and application.html.erb, but I get nothing from my ember bits rendered.
I am at a bit of a loss on how to troubleshoot this issue. Can someone point me in the right direction?
Thanks!
Update: I am also getting this error:
Uncaught TypeError: Attempting to register an unknown factory: `store:main`
and I do have App.Store defined in store.js:
App.Store = DS.Store.extend({
adapter: DS.RESTAdapter.create()
});
Share
edited Nov 12, 2013 at 22:21
cosmikwolf
asked Nov 12, 2013 at 19:57
cosmikwolfcosmikwolf
3997 silver badges15 bronze badges
1
- Was this ever resolved and you managed to get it working? Having a similar issue now. – Ryan Drake Commented Sep 2, 2014 at 6:45
1 Answer
Reset to default 9I think that you are using the Ember Data 0.13 or 0.14. In these versions you need to declare the store property. Like this:
App.Store = DS.Store.extend({
adapter: DS.RESTAdapter
})
Update: I am also getting this error:
Uncaught TypeError: Attempting to register an unknown factory:
store:main
Make sure that your App.Store = ...
declaration es before the ember-data script.
本文标签: javascriptGetting an Assertion Failed error after integrating Ember with Rails 4Stack Overflow
版权声明:本文标题:javascript - Getting an Assertion Failed error after integrating Ember with Rails 4 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742291161a2447823.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论