mardi 29 décembre 2015

rails ember-cli No route matches [GET] > "/javascripts/emberFrontend/vendor.js"

I am new to Ember and I'm trying to understand how the asset building works. I have an existing Rails project that is in the middle of conversion to Ember, with ember-cli.

ember 1.13 ruby 2.1.6 rails 4.1.6

I keep getting these errors when trying to access ember pages, and I'm trying to isolate when, and what causes them:

Started GET "/javascripts/emberFrontend/vendor.js" for 127.0.0.1 at 2015-12-28 17:10:16 +0200

ActionController::RoutingError (No route matches [GET] "/javascripts/emberFrontend/vendor.js"): ...

Started GET "/javascripts/emberFrontend/ember-frontend.js" for 127.0.0.1 at 2015-12-28 17:10:16 +0200

ActionController::RoutingError (No route matches [GET] "/javascripts/emberFrontend/ember-frontend.js"):

for example, I take a page that is rendering fine and logs:

Started GET "/assets/emberFrontend/vendor-b0892280be71c70102741f9d7feb0532.js" for 127.0.0.1 at 2015-12-28 17:53:15 +0200

Started GET "/assets/emberFrontend/ember-frontend-affc24729a1c2e1a0a6a56334d2bb16a.js" for 127.0.0.1 at 2015-12-28 17:53:15 +0200

And I make a change in the template code from:

<li class="reportsTab"><a href={{urls.reports}}>Reporting</a></li>

to:

<li>{{#link-to "merchant.reports"}}Reporting{{/link-to}}</li>

In order for one of the page tabs to direct to the ember code instead of the old one, similar to other changes made on that page. This change causes the errors above, and the browser page is blank.

What is puzzling me is that if I revert the change while the rails server is running, and then restart it - it doesn't stick, but if I stop the server, than make the change and rerun it, it does. Clearly I am missing something in understanding how the ember server is building the assets, but I can't figure it out from any guides.

Also (and possbily related), my */emberFrontend/tmp directory doesn't clean.




Aucun commentaire:

Enregistrer un commentaire