Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Ember.js Routes and Templates Basic Routes and Templates

I can't link to localhost/#/posts

I have follow what this tutorial taught, but I am running in a wamp server. I can successfully set up a ember application. But when I am trying to link to localhost/#/posts then console log tells me I did something wrong. It says,

Error: Assertion Failed: The URL '/posts' did not match any routes in your application

I am currently using window virtual server wamp, is this the reason why I can't successfully link to posts even I have copy everything from this tutorial? Please help me set up ember.js successfully. Any help is appreciated.

Michael Kaiser-Nyman

6 Answers

Thomas Moore
Thomas Moore
4,275 Points

Chanlennon, I was getting the same error, but it turned out I had misreferenced my app in my router.js file

Are you getting any other errors? Or just that one?

Check if there's an uncaught reference error as well.

Michael van Olst
Michael van Olst
14,526 Points

hi chanlennon

Can you show us the code?

Yes sorry about this, actually I have solved this problem already, forgot to mention up here, it was just caused by my misreferencing, same as Thomas. Thank you very much.

For anyone wondering what the mis-reference was, it was the router.js file for me. In the video it looks as if that file is within the "models" folder, whereas in fact it should be saved to the folder root.

David Leacock
David Leacock
8,532 Points

I got the same error and it was from two mistakes. A typo in router.js and my posts.hbs file wasn't in templates. Hopefully that helps someone.

Josh Copeland
Josh Copeland
11,346 Points

I had same error but I had router.js in my routes folder when it was supposed to be in the root folder and I also had a typo in my <script src="router.js"></script>