New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compass will not build (exit code 255) #59

Closed
raduluchian opened this Issue Jun 14, 2015 · 11 comments

Comments

Projects
None yet
2 participants
@raduluchian

raduluchian commented Jun 14, 2015

I have this plugin installed in Sublime Text 3 and whenever I want to build I get this in the console:

\projects\website' was unexpected at this time.
[Finished in 0.1s with exit code 255]
[cmd: build.cmd "G:\projects\website\scss\modules" "G:\projects\website"]
[dir: C:\Users\Radu\AppData\Roaming\Sublime Text 3\Packages\Compass]
[path: C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\WinSCP\;C:\Ruby\bin]

This issue has been described by someone else on Stack Overflow, but with no resolution:

http://stackoverflow.com/questions/25229159/sass-compass-will-not-build-exit-code-255-sublime-text-3#comment49709536_25229159

It's worth mentioning that I am running the same configuration at home as at the office with the difference that at the office I am running on Linux Mint and at home on Windows 8.1.

@renestalder

This comment has been minimized.

Show comment
Hide comment
@renestalder

renestalder Jun 15, 2015

Contributor

Hi @raduluchian. So as I understand, you get the exact same error in the same project on both machines, independent of the OS you're running. Sounds like the project setup is wrong for the the build system first instance. But lets try to get some more details.

What does your compass config (config.rb) looks like? It should be stored in the root folder of your project.

Also, did you try to compile via console & terminal with a raw compass command?

Contributor

renestalder commented Jun 15, 2015

Hi @raduluchian. So as I understand, you get the exact same error in the same project on both machines, independent of the OS you're running. Sounds like the project setup is wrong for the the build system first instance. But lets try to get some more details.

What does your compass config (config.rb) looks like? It should be stored in the root folder of your project.

Also, did you try to compile via console & terminal with a raw compass command?

@raduluchian

This comment has been minimized.

Show comment
Hide comment
@raduluchian

raduluchian Jun 15, 2015

Sorry for not being more clear on the last part. The same project is working on my Linux Mint machine (office) but it's not working on my Windows 8.1 machine (home). The config file is the same on both machines.

I haven't tried compiling via terminal yet but I have successfully compiled using Compass.app. I will share the config.rb file this evening.

raduluchian commented Jun 15, 2015

Sorry for not being more clear on the last part. The same project is working on my Linux Mint machine (office) but it's not working on my Windows 8.1 machine (home). The config file is the same on both machines.

I haven't tried compiling via terminal yet but I have successfully compiled using Compass.app. I will share the config.rb file this evening.

@renestalder

This comment has been minimized.

Show comment
Hide comment
@renestalder

renestalder Jun 15, 2015

Contributor

Is it possible that it could be related to backslashes #58 on Windows? I'm not sure Compass.app takes the config.rb or maintaining its own configuration.

Contributor

renestalder commented Jun 15, 2015

Is it possible that it could be related to backslashes #58 on Windows? I'm not sure Compass.app takes the config.rb or maintaining its own configuration.

@raduluchian

This comment has been minimized.

Show comment
Hide comment
@raduluchian

raduluchian Jun 15, 2015

I will try looking into the backslashes as well. As far as the config.rb file goes, I know that Compass.app uses the file found in the root of the project and if it's not there it throws an error.

raduluchian commented Jun 15, 2015

I will try looking into the backslashes as well. As far as the config.rb file goes, I know that Compass.app uses the file found in the root of the project and if it's not there it throws an error.

@raduluchian

This comment has been minimized.

Show comment
Hide comment
@raduluchian

raduluchian Jun 16, 2015

These are the contents of my config.rb file:

css_dir = "css"
sass_dir = "scss"
images_dir = "img"
output_style = :expanded
relative_assets = true
line_comments = false
sass_options = {:debug_info=>false}
sourcemap = false

raduluchian commented Jun 16, 2015

These are the contents of my config.rb file:

css_dir = "css"
sass_dir = "scss"
images_dir = "img"
output_style = :expanded
relative_assets = true
line_comments = false
sass_options = {:debug_info=>false}
sourcemap = false
@renestalder

This comment has been minimized.

Show comment
Hide comment
@renestalder

renestalder Jun 17, 2015

Contributor

Can you try to run the compass command directly from the console on your Windows machine? Of course in your project root folder.

compass compile

I would like to find out if it's related to the package or your environment. And I still think, the Compass.app includes compass itself and does not rely on the local installation of the compass gem.

Contributor

renestalder commented Jun 17, 2015

Can you try to run the compass command directly from the console on your Windows machine? Of course in your project root folder.

compass compile

I would like to find out if it's related to the package or your environment. And I still think, the Compass.app includes compass itself and does not rely on the local installation of the compass gem.

@raduluchian

This comment has been minimized.

Show comment
Hide comment
@raduluchian

raduluchian Jun 18, 2015

Just tried compiling from the comand line as you suggested and it works fine.

raduluchian commented Jun 18, 2015

Just tried compiling from the comand line as you suggested and it works fine.

@renestalder

This comment has been minimized.

Show comment
Hide comment
@renestalder

renestalder Jun 19, 2015

Contributor

So my next guess is, the path of your project contains some special chars and the windows batch seems to have problems with them in the for-loop. That's also what I see in the stackoverflow thread.

Do you have special chars like brackets or braces in your path? If yes, could you try to move your project to a more generic path and test it again?

Good

C:\mypath\projects\my_project

Bad

C:\mypath\projects\my_project (1)\mysuperwebsite
Contributor

renestalder commented Jun 19, 2015

So my next guess is, the path of your project contains some special chars and the windows batch seems to have problems with them in the for-loop. That's also what I see in the stackoverflow thread.

Do you have special chars like brackets or braces in your path? If yes, could you try to move your project to a more generic path and test it again?

Good

C:\mypath\projects\my_project

Bad

C:\mypath\projects\my_project (1)\mysuperwebsite
@raduluchian

This comment has been minimized.

Show comment
Hide comment
@raduluchian

raduluchian Jun 21, 2015

Indeed the issue was in the project path. The name of the folder used to be:

F:\Project\Website (development)\

After having done a bit of restructuring I've renamed it into:

F:\Project\Website\Development\

Now the code is compiled as expected, so I have a working plugin that does it's job properly. Thanks a lot for the patience and help, René!

Is there however a way to have it work with paths such as the one I originally had?

raduluchian commented Jun 21, 2015

Indeed the issue was in the project path. The name of the folder used to be:

F:\Project\Website (development)\

After having done a bit of restructuring I've renamed it into:

F:\Project\Website\Development\

Now the code is compiled as expected, so I have a working plugin that does it's job properly. Thanks a lot for the patience and help, René!

Is there however a way to have it work with paths such as the one I originally had?

@renestalder

This comment has been minimized.

Show comment
Hide comment
@renestalder

renestalder Jun 22, 2015

Contributor

The batch file of this package uses a for loop to loop trough a list of folders or files. This part may have to be encoded correctly to work with all path.

I'm not a windows batch pro. But what I found is, that the /r command should do this.
https://stackoverflow.com/questions/10564761/how-to-deal-with-possible-special-characters-when-iterating-files-with-for-comma

So you could try to edit the batch file (Preferences → Browse Packages, then go to the Compass folder) and change the /f in the loop to a /r, like this:
https://gist.github.com/renestalder/6786d144655db47d4dd2

I didn't tested it. No clue if it works and if it solves the problem and when, if it solves it for all path. It's worth a try.

Anyway, I will add your case to the F.A.Q. in the readme.

Contributor

renestalder commented Jun 22, 2015

The batch file of this package uses a for loop to loop trough a list of folders or files. This part may have to be encoded correctly to work with all path.

I'm not a windows batch pro. But what I found is, that the /r command should do this.
https://stackoverflow.com/questions/10564761/how-to-deal-with-possible-special-characters-when-iterating-files-with-for-comma

So you could try to edit the batch file (Preferences → Browse Packages, then go to the Compass folder) and change the /f in the loop to a /r, like this:
https://gist.github.com/renestalder/6786d144655db47d4dd2

I didn't tested it. No clue if it works and if it solves the problem and when, if it solves it for all path. It's worth a try.

Anyway, I will add your case to the F.A.Q. in the readme.

@raduluchian

This comment has been minimized.

Show comment
Hide comment
@raduluchian

raduluchian Jun 22, 2015

Ok, will look into it to see if that solution works. Thanks for the help!

raduluchian commented Jun 22, 2015

Ok, will look into it to see if that solution works. Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment