mardi 5 avril 2016

Ember CLI and Rails: Error proxying to http://localhost:3000

I am following this tutorial for Ember CLI and Rails. I am stuck at the point where you are supposed to load the Book model data using the following command in the console:

App.store.findAll('book');

No data is retrieved and the Ember terminal logs show this error:

Error proxying to http://localhost:3000
connect ECONNREFUSED 127.0.0.1:3000
Error: connect ECONNREFUSED 127.0.0.1:3000
    at Object.exports._errnoException (util.js:890:11)
    at exports._exceptionWithHostPort (util.js:913:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1061:14)
GET /books - - ms - -

However when I visit http://localhost:3000/books (the Rails backend), I get the correct JSON response with all the books. Why is the Ember app not able to retrieve this data and how can I fix it?




Aucun commentaire:

Enregistrer un commentaire