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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Unsubscribed User](https://secure.gravatar.com/avatar/65baaaa23b2d1e72098632a6cd55d1d3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Unsubscribed User
14,667 PointsDS is not defined
I've followed the whole video and did everything that was done in the video. Nevertheless, if I preview the project I get a blanc screen and the error: Uncaught ReferenceError: DS is not defined. routes/posts.js:
Blogger.PostsRoute = Ember.Route.extend({
model: function(){
return this.store.find('post');
}
});
models/post.js:
Blogger.Post = DS.Model.extend({
title: DS.attr(),
body: DS.attr()
});
models/comments.js:
Blogger.Comment = DS.Model.extend({
text: DS.attr()
});
index.html:
<!DOCTYPE html>
<html>
<head>
<title>Dracula's blog</title>
<link rel="stylesheet" href="css/bootstrap.css">
<script src="libs/jquery-1.11.1.js"></script>
<script src="libs/handlebars-v1.3.0.js"></script>
<script src="libs/ember.js"></script>
<script src="libs/ember-handlebars-loader-0.0.1.js"></script>
<script src="libs/ember-data.js"></script>
<script src="libs/localstorage_adapter.js"></script>
<script src="blogger.js"></script>
<script src="router.js"></script>
<script src="store.js"></script>
<script src="controllers/about.js"></script>
<script src="controllers/contact.js"></script>
<script src="controllers/post.js"></script>
<script src="controllers/posts.js"></script>
<script src="routes/posts.js"></script>
<script src="routes/post.js"></script>
<script src="routes/recent-comments.js"></script>
<script src="models/post.js"></script>
<script src="models/comment.js"></script>
<script>
EmberHandlebarsLoader.loadTemplates(['posts', 'about', 'contact', 'phone', 'email', 'application', 'recent-comments', 'post']);
</script>
</head>
<body>
</body>
</html>
Am I overlooking something?
4 Answers
![Dave McFarland](https://uploads.teamtreehouse.com/production/profile-photos/408222/micro_1M7A0052.jpg)
Dave McFarland
Treehouse TeacherHello Sanne van Tongelen
The first error I see is about the ember-data.js
file. I opened your ember-data.js
file and it was missing some of the code. I replaced the code in your workspace and it seems to be working now. I'm not sure how the code disappeared from the ember-data.js
file, but that was the issue.
![Dave McFarland](https://uploads.teamtreehouse.com/production/profile-photos/408222/micro_1M7A0052.jpg)
Dave McFarland
Treehouse TeacherSanne van Tongelen are you working in Workspaces for this? If so can you take a Workspace snapshot and share it here in the forum?
![Talha Khalid](https://secure.gravatar.com/avatar/5013cc37b25ace7e6a74fd4b19e10ac3?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Talha Khalid
10,262 PointsCould you also provide me with the solution to this? I appear to be having the same problem as well. Here is a snapshot of my workspace:
Thanks!
![Unsubscribed User](https://secure.gravatar.com/avatar/65baaaa23b2d1e72098632a6cd55d1d3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Unsubscribed User
14,667 PointsHere is a link to the screenshot of my dev tools, this is where the error appears. Screenshot devtools
The workspace snapshot doesn't add any value, so I added a screenshot, with my index file and the folders opened. Screenshot workspaces
Hopefully this gives you enough information.
![Dave McFarland](https://uploads.teamtreehouse.com/production/profile-photos/408222/micro_1M7A0052.jpg)
Dave McFarland
Treehouse TeacherHi Sanne van Tongelen. A Workspace snapshot would be the best way for us to track down the error -- we can fork your snapshot into a workspace, then test your code to see what is going wrong. The screenshots aren't that helpful in tracking down this error. Could you post a snapshot? Thanks
![Unsubscribed User](https://secure.gravatar.com/avatar/65baaaa23b2d1e72098632a6cd55d1d3?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Unsubscribed User
14,667 PointsHere is a Snapshot of my workspace
Unsubscribed User
14,667 PointsUnsubscribed User
14,667 PointsThanks very much. :)