Danny Danny - 2 months ago 6
Ruby Question

trying to install ruby gems for sass

sass install error

Hi.I am trying to install sass from ruby gems on windows. I installed ruby but when I run

gem install saas
command in cmd, it gives the following error:

> gem is not recognized as internal or external command, operable program or batch file.


If you forget to check the path box while installing ruby (assuming you installed ruby using rubyinstaller or railsinstaller), just add the ruby bin path to the PATH enviromental variable. Open command prompt and run following:

setx PATH "%PATH%;C:\Ruby22-x64\bin\\"

Then type echo %PATH% to check if it was added correctly.


You can add it by opening My Computer > Properties > Advanced system settings > Advanced > Environmental Variables, under "User variables", double click PATH, then add your ruby bin path, make sure paths are separated by a ";" (;C:\Ruby22-x64\bin\\ in my case)