Comments (12)
I have not tested in Windows 8, so I can't guarantee it will work in that environment.
Can you confirm the following:
- Are there any errors in the python console (View > Show Console) in Sublime Text when running the plugin?
- Have you installed sass?
- Has sass been added to your environment path? (EG, can you run
sass-convert --version
from cmd.exe?)
from sassbeautify.
- Sass is installed
- When I do
sass-convert --version
in the Command Prompt (with Ruby), it shows me :Sass 3.2.12 (Media Mark)
- You're right, there are errors when I execute SassBeautify !
Here is the copy/paste :
Exception in thread Thread-3: Traceback (most recent call last): File ".\threading.py", line 532, in __bootstrap_inner File ".\SassBeautify.py", line 51, in run File ".\subprocess.py", line 701, in communicate File ".\subprocess.py", line 911, in _communicate IOError: [Errno 32] Broken pipe
Traceback (most recent call last): File ".\SassBeautify.py", line 134, in File ".\SassBeautify.py", line 137, in check_thread File ".\SassBeautify.py", line 154, in handle_process AttributeError: 'NoneType' object has no attribute 'splitlines'
from sassbeautify.
OK then, thanks for this. I'm a total python noob, but i've done a bit of research and I'm taking an educated guess that the issue is SIGPIPE, and this is a possible solution: http://stackoverflow.com/a/16865106/492325
Unfortunately I don't have a windows 8 machine to test. If I push a fix to a different branch, would you have the time to re-install the plugin manually to help me test?
from sassbeautify.
Sure, no problem, with pleasure ! Tell me when I can do it for you.
from sassbeautify.
Thanks man. I think there's some other things we need to verify before pushing any code.
- You mention the Command Prompt (with Ruby), what does that mean exactly? Have you tested the sass-convert command (
sass-convert --version
) using the default command prompt or a powershell prompt? - Are you using RVM or any other ruby version manager, and if so, can you paste your path settings?
- Can you paste this into your python console in Sublime Text and let me know the output?:
import subprocess;p=subprocess.Popen(['sass-convert','--stdin','--from','scss','--to','scss'],stdout=subprocess.PIPE,stdin=subprocess.PIPE,stderr=subprocess.PIPE);(stdout, stderr)=p.communicate(input=".test{color:red;}".encode('utf-8'));print("STDOUT %s" % stdout.decode('utf-8'));print("STDERR %s" % stderr.decode('utf-8'));
(Possibly related: http://stackoverflow.com/a/2068329/492325)
from sassbeautify.
Ruby
- I installed it using this : http://www.rubyinstaller.org/ (recommended here : http://sass-lang.com/install )
- With this installer, I have a this :
The one on the left is the default Windows cmd.exe. The other one on the right ("Start Command Prompt with Ruby") is installed with "Ruby Installer". I have to use it to install sass and compass, even on Windows 7
- If I use the default cmd.exe and execute
sass-convert --version
i've got this : 'sass-convert' is not recognized as an internal or external command, operable program or batch file.
Console & Output
Here is the result :
>>> import subprocess;p=subprocess.Popen(['sass-convert','--stdin','--from','scss','--to','scss'],stdout=subprocess.PIPE,stdin=subprocess.PIPE,stderr=subprocess.PIPE);(stdout, stderr)=p.communicate(input=".test{color:red;}".encode('utf-8'));print("STDOUT %s" % stdout.decode('utf-8'));print("STDERR %s" % stderr.decode('utf-8')); Traceback (most recent call last): File "", line 1, in File ".\subprocess.py", line 633, in __init__ File ".\subprocess.py", line 842, in _execute_child WindowsError:
from sassbeautify.
If I use the default cmd.exe and execute sass-convert --version i've got this : 'sass-convert' is not recognized as an internal or external command, operable program or batch file.
So this looks like a path issue then. Can you open up the "Start Command Prompt with Ruby" prompt, then paste this in: echo $PATH
then add that path to your SassBeautify settings file.
from sassbeautify.
I had nothing special to do on Windows 7...
I just noticed something : http://rubyinstaller.org/downloads/
If you don’t know what version to install and you’re getting started with Ruby, we recommend you use Ruby 1.9.3 installers. These provide a stable language and a extensive list of packages (gems) that are compatible and updated.
Ruby 2.0.0, specially the 64bits version, are relatively new on the Windows area and not all the packages have been updated to be compatible with it.
I don't know which version I have on Windows 7, but on my Windows 8 I installed Ruby 2.0.0.
I try the other version (1.9.3) and I come back to tell you if it works.
from sassbeautify.
Okay, the 2.0.0 works, I just made a mistake : when I installed it yesterday, I didn't check the option "Add Ruby executables to your PATH". I didn't know what it meant so I didn't touch it. (And the first time on Windows 7 I followed a tutorial, maybe it was indicate to check it)
Thank you for your help, and sorry for taking your time for nothing. :(
(One good thing : now, you can tell "it works on Windows 8 !")
from sassbeautify.
Great that you got it working. Yes this path issue has been quite a problem in the past. No problem man, you haven't wasted my time, I think we both gained some knowledge out of this experience, and indeed it's good to know the plugin does work on Windows 8!
BTW regarding getting the path value, for windows it should have been: echo %path%
, my bad!
I'm going to try add some documentation to the README about this which should hopefully help others if they have the same problem.
from sassbeautify.
I've added a bit more info to the README about RubyInstaller: https://github.com/badsyntax/SassBeautify#issues-with-ruby-sass-and-your-path
from sassbeautify.
When I do "echo %path% I see a lot of information, but when I try SassBeautify then I get the error:
There was an error beautifying your Sass:
[Errno 32] Broken pipe
No further error information is given. Is there anything I can do to fix it?
EDIT: I got it working. Had to do: gem install sass.
from sassbeautify.
Related Issues (20)
- General config file in repo for sharing between developers
- Not working after latest ST3 Update HOT 2
- Option to re-order css properties on beautify HOT 3
- Leading zero HOT 1
- [Errno 2] No such file or directory: 'sass-convert' HOT 7
- Indentation HOT 4
- Extra line between comment and closing bracket HOT 1
- Add missing semicolons automatically rather than sass-convert throwing error
- Double quotes in single quotes are changed on compile
- Simply not working
- it does't work and throw a error 'UnicodeDecodeError'
- UTF-8 not supported
- SassBeautify throwing the following error - No such file or directory 'sass-convert' HOT 9
- Attempting to use BEM methodology Sass breaks formatting
- Ability to set FinalNewline to true HOT 1
- [Errno 2] No such file or directory: 'sass-convert' HOT 2
- Double quotes are changed on compile
- Allow manual use on non .scss/.sass/.css files. HOT 1
- Error
- going insane
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sassbeautify.