Netbeans - installing SASS

2019-02-21 19:39发布

I have had a few attempts at installing SASS on netbeans. I have followed the following tutorial:

http://kgagliardo.com/blog/netbeans-sass-windows-7

I get the below error when creating and trying to save the SASS file and no CSS file is created.

""C:\Ruby193\bin\sass.bat" "--cache-location" "C:\Users\Leanne\AppData\Local\NetBeans\Cache\7.4\sass-compiler" "C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\store.scss" "C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\css\store.css" '"ruby.exe"' is not recognized as an internal or external command, operable program or batch file. Done."

I've been stuck on this all morning, please help...

UPDATE I've tried to follow the instructions provided below and it still does not work, although I did get a slightly different error message:

"C:\Ruby193\bin\sass.bat" "--cache-location" "C:\Users\Leanne\AppData\Local\NetBeans\Cache\7.4\sass-compiler" "C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\store.scss" "C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\css\store.css" Syntax error: File to import not found or unreadable: foundation/components/accordion. Load path: C:/Users/Leanne/Documents/work/freelance/sites/fws_templates (DEPRECATED) on line 10 of C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\foundation\foundation.scss from line 11 of C:\Users\Leanne\Documents\work\freelance\sites\fws_templates\gamer\scss\store.scss Use --trace for backtrace. Done.

However Now I simply get the original error message again. No idea what to do. See image below showing that I have done everything according to the instructions (I think).

http://i.stack.imgur.com/Eekyt.png

enter image description here

4条回答
姐就是有狂的资本
2楼-- · 2019-02-21 20:35

They are all right in the above message. The problem is that Netbeans is not designed to pick up these changes instantaneously. Once you make the changes above, you have to RESTART Netbeans, so that the changes will be applied. This worked for me. Let me know if it works for you.

Thanks

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-02-21 20:36

You don't have path to ruby.exe which is c:\Ruby\192\bin in you PATH variable.

In Windows 7:

  1. Right click on My computer and select Properties -> Go to Advanced Tab -> Click on the Environmental Variables button

  2. In the Environmental Variables window highlight PATH variable in System variables section and click Edit

  3. Append ;c:\Ruby\192\bin to the end (the semicolon is intentional)

  4. Restart command prompt

查看更多
Rolldiameter
4楼-- · 2019-02-21 20:37

Your path environment variable points to the wrong folder

Your Path to ruby is C:\Ruby193\bin

Go back and edit your path environment variable to point to C:\Ruby193\bin . At the moment you have C:\Ruby\192\bin

EDIT

And Now remove the backslash between Ruby and 193.
Your Path is set to : C:\Ruby\193\bin :-) !
your .bat is in Folder : C:\Ruby193\bin

TIP

Go to Options

Miscellaneous --> CSS Preprocessors

check : Generate extra information (debug)

查看更多
劳资没心,怎么记你
5楼-- · 2019-02-21 20:43

You don't have path to ruby.exe

As simple, reinstall ruby, use ruby installer for windows.

When you go through the installation wizard, you’ll come to this options screen:

From what I can tell, the only option that you need to check on that one is the middle option, which helps your command-line instructions recognize where to find (as it says) “Ruby executables”. Otherwise, you’ll get the error message “ruby is not recognized as an internal or external command” when you try to install Sass in the command prompt. Go to Options

Miscellaneous --> CSS Preprocessors

check : Generate extra information (debug)

For more information go to Setting Up Sass on Windows

查看更多
登录 后发表回答