I am following the tutorial at Ember and Rails 5 with JSON API: A Modern Bridge.
Thus, I now have a rails-api for backend and ember for front end. I started the rails server as suggested:
$ bin/rails server --binding 0.0.0.0
Started the ember server:
$ Ember s --proxy --http ://localhost:8080 --port 8081
I had to specify a port for creating the Ember server though, because I got an error saying:
Port 8080 is already in use
It seems as the rails backend work as if it is suppose to. When I visited http://localhost/something.json I get the proper json response.
In the tutorial they ask you to visit the ember frontend open ember inspector, console and enter the command :
$E.store.findAll('book');
The response I get is:
Uncaught TypeError: Cannot read property 'findAll' of undefined(…)
I am using c9 with this tutorial, not sure if it has anything to do with it though.
The question is, Why am I getting this Error?
I Am new to stackoverflow, Rails and Ember.
I have searched the question and the solutions posted did not work for me.
Aucun commentaire:
Enregistrer un commentaire