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

CSS

Correct sass directory: how do I access my directory in the terminal?

I want to access the following directory:

sass --watch program/mamp/htdocs/folder/test.scss, but I get the following error in the terminal.

Sass is watching for changes. Press Ctrl-C to stop. Errno::ENOTDIR: Not a directory - program/mamp/htdocs/folder/test.css (changes .scss to .css)

The folder exists, as does the file. You could have explained it better, some of us don't like working in the terminal.

5 Answers

Try the following

cd /Applications/MAMP/htdocs

This will change the current directory to MAMP's htdocs directory, from there you just need to include the path to your project

sass --watch /project1/project.scss

Thanks for your time, it worked.

Glad you got everything working. The terminal can be really frustrating at times, especially when the error messages aren't very verbose.

What directory are you in when you are running the command? If you run the command ls (lowercase L) what does your folder structure look like?

Like this:

Claudius-MacBook-Pro:~ claudiu$ ls

Applications PhpstormProjects

Creative Cloud Files Pictures

Creative Cloud Files (unknown) Public

Desktop bitlord_log.txt

Documents bwinPoker

Downloads danid.log

Google Drive htdocs

KeplerData jEdit

Library program

Movies robocode

Music visualparadigm

P5JavaClientSettings vpworkspace

I now tried sass --watch htdocs/folder/test.scss, thinking it could access the htdocs folder, but I get the same problem. . I thought this would be like including php files with include, or when you include files in the html file, but seems to follow a different logic. :S

I get an error:

sass --watch /sass/test2.scss

^CClaudius-MacBook-Pro:htdocs claudiu$ sass --watch /sass/test2.scss

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777

Sass is watching for changes. Press Ctrl-C to stop.

  error No such file or directory - /sass/test2.scss

Errno::EACCES: Permission denied - /sass/test2.css

Use --trace for backtrace.

Anyways, I'm moving on, it's not worth the hassle. Thanks anyway.

If you decide to try again, try using sudo before the command, depending on your setup it might need permission to edit the directory/files.