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 trialmargot peter
214 Pointswon't let me save index.html
says "can't save /index.html"
15 Answers
Matt Trask
10,027 Pointsdont have a "slash" in front of it. just save the file as index.html in your projects folder. what operating system are you on?
Jordan Clarke
23,464 PointsNo need for the forward slash at the beginning. Just save as index.html in whatever folder you're using for the website.
Jordan Clarke
23,464 PointsHi Margot. Have you created a new folder on the desktop and tried saving to there?
margot peter
214 Pointsum no... what kind of folder should it be. On the video it has a "web" folder which I don't have. Should I do it like that?
Jordan Clarke
23,464 PointsJust create a standard new folder on your desktop and call it 'web project' or whatever you want and try saving the index.html there.
Ryan Carson
23,287 PointsCan you please give us more context? Why are you trying to save a file? Who's asking you to do it? Thanks!
margot peter
214 PointsI am trying to do the step in the lists and images section (around second 56 in the 12:55 long video) of saving sublime text 2 as index.html.
margot peter
214 PointsOk I just did it! Thank you all for your help. One thing though, I tried to download an image myself and use it in the code of this demonstration, but when I refreshed the browser, it didn't pick it up. Not a big deal, but if anyone feels like telling me why that would be great.
Jordan Clarke
23,464 PointsNo problem. On that next point, you'd need to post the code so we can see what might be causing the issue.
margot peter
214 Pointsok, first I created a folder called img, then I downloaded an image from the internet, saved it as cupcake.jpg and put it in the folder. This is the code I used: <img src="img/cupcake.jpg" alt="Smells Like Bakin">
Paul Dariye
Courses Plus Student 9,097 PointsHey try this in your terminal. cd into the directory you're using for your project and then type the following:
$ sudo chmod 777 .
I hope this works. a shorter way is to have the path to the directory directly without having to cd into it so it would be:
$ sudo chmod 777 /path/to/your/directory/
After either of these, try saving your file again.
Let me know how it goes.
Jordan Clarke
23,464 PointsI cant see the code for some reason Margot. You're correct to create a IMG folder and put the image in here. The code to insert the image should look something like this:
<img src="img/cupcake.jpg" alt="cupcake">
Jordan Clarke
23,464 Points````<img src="img/cupcake.jpg" alt="cupcake">
Jordan Clarke
23,464 Points <img src="img/cupcake.jpg" alt="cupcake">
margot peter
214 Pointsyes that is exactly what i wrote. maybe i created the folder incorrectly? I just created a new folder and called it img.
Jordan Clarke
23,464 PointsNo you need to create a folder on desktop, call it 'web project', then in that folder create another folder called 'img' and put the image in there. You want a main folder for the files such as the index.html and then a secondary folder inside the main one to place your images in.
margot peter
214 PointsThat Worked!!! Thank you!
Jordan Clarke
23,464 PointsNo problem. Happy to help :-)
margot peter
214 PointsThank you so much Jordan, I will try that
margot peter
214 Pointsmargot peter
214 PointsI tried to eliminate the slash, but it kept coming up. I am on Mac OS X version 10.7.5