2

Today I install Ruby and Sass, and every went pretty normally.

I have Ruby installed and in my path. I can even do the following:

C:\> ruby -v
ruby 2.2.4p230 (2015-12-16 revision 53155) [x64-mingw32]

I also installed Sass, and the terminal, to my belief, knows that I'm calling Sass, but fails due to something else:

C:\> sass
'""C:\Program' is not recognized as an internal or external command,
operable program or batch file.

My guess is that the issue stems from Ruby being installed in:

C:\Program Files\Ruby\22-x64\

And that it doesn't like the space in Program Files.

How can I fix this, without moving my Ruby installation?

cimmanon
  • 67,211
  • 17
  • 165
  • 171
Boom
  • 2,465
  • 4
  • 19
  • 21
  • What folder is sass installed in? – JLB Mar 23 '16 at 22:30
  • I installed it using `gem install sass`, which I believe put it in `C:\Program Files\Ruby\22-x64\lib\ruby\gems\2.2.0\gems\sass-3.4.21`. I'm not sure where the "true" Sass is, as there's a bin folder within the mentioned Sass folder, and there's a sass file within Ruby's cache. – Boom Mar 23 '16 at 22:37
  • you could try finding the short pathname for your ruby install folder by using dir /x and then you could change your ruby path in the environment to the short version. otherwise you're going to have to look in the sass gem folder and see if it stored any configuration files and just change the path in the files to the short version as well. – JLB Mar 23 '16 at 23:43
  • In a similar situation I moved my installation - it avoided [other problems](http://stackoverflow.com/a/6193802/676874) with other gems, – knut Mar 27 '16 at 16:38

1 Answers1

1

edit sass.bat (and compass.bat .. in fact, you might review all the .bat files there) in %RUBY%/bin path and replace the lines that start @""C:\Program... with @"C:\Program....

You also will get use of the "Start Command Prompt with Ruby" Start Menu launcher if you edit the setrbvars.bat while you are there.

roberto tomás
  • 4,435
  • 5
  • 42
  • 71