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

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 91,252 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 91,252 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 91,252 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