Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS

Denis Omerovic
Denis Omerovic
728 Points

How to set up sass to work on a live server.

How to set up sass to work on a live server. I am using sftp Winscp but i'm not sure what i need to do to set up properly so i can edit files.

3 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 90,705 Points

Hi Denis,

My understanding of Sass is that I'm sure that development with SASS is done locally, using SCSS files to develop SASS to then compile output CSS files, which you would then transfer to your host server in the usual way. You wouldn't put SCSS files on your server.

Hope this helps!

Denis Omerovic
Denis Omerovic
728 Points

Hi Jonathan, thanks for the answer but that's not what i want. I know that browsers don't understand sass, only css but i want to work on a live server not locally. I'm using putty to connect to my server and i have winscp also. I want to write scss files that will output css immediately on my server. I'm not sure how to set up everything. I'm working on a Drupal site and i'm tryin sass --watch scss:css but i get the error like "error No such file or directory @ rb_sysopen - scss".

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 90,705 Points

That command will output files into a CSS folder inside the same directory as your current directory. You can specifiy different directories easily using watch but again, I don't think it's meant to connect with your host server in that way. :-)

Denis Omerovic
Denis Omerovic
728 Points

But what is the best way to work on a website on a live server.

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 90,705 Points

Hi Denis,

I presume you're familiar with using FTP to transfer your local files to your host server? That's all you need to do, to work with a live website.... an ftp domain server along with a username and a password which your web host will supply.

With Sass for example

  • You organise your SCSS files and output CSS files into separate folders

  • You'd then put the CSS files in their own server on the host server. Again, your SCSS files stay on your local machine.

  • All of this would go in the Root directory of your host server which is typically the public_html or www folder.

Debendra Maharjan
Debendra Maharjan
258 Points

Hi Denis, You need to use scssphp, the php will compile sass file into css even on server. I am using the same Winscp and using that scssphp, it works fine for me. Once you save your sass file it will automatically convert your sass to css, but you need to upload your sass files as well.

Thanks