I'm just trying to install my usual worflow setup at my new workplace, but the ruby commands aren't recognized.
I'm on windows 7 professional service pack. I installed Ruby and Node with their windows installer.
I put manually the PATH variables, there they are:
C:\Ruby200-x64\bin;C:\Users\mikael.boutin\AppData\Roaming\npm;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft\Web Platform Installer\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;c:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\nodejs\
Node JS and Ruby folder are there, the commands works in my cmd, but they are not recognized in the powershell.
I really don't know what to do to make it work.
I use the powershell with Sublime Text 2 (Terminal package). It open it at the exact selected folder.
What can i do?
Please be soft in your explaination, i'm a frontend developper with no technician knowledge.
Thank you!
As a session only fix you can type:
$env:Path += ";Your Path"
To check to see if it worked use
echo $env:path
After you append your path try running those ruby commands and if they work you have narrowed the problem down to your path. However if they don't work it probably is not your path.
If it was your path you have a couple of options. First you could manually go into your PowerShell directory and edit your profile.ps1
file and add:
[Environment]::SetEnvironmentVariable
("Path", $env:Path, [System.EnvironmentVariableTarget]::Machine)
For system. To change the the users environmental variable change "Machine" to "User"
If you want to do the easier way do this:
$addme = "PATH YOU WANT TO ADD HERE"
$Reg = "Registry::HKLM\System\CurrentControlSet\Control\Session Manager\Environment"
$OldPath = (Get-ItemProperty -Path "$Reg" -Name PATH).Path
$NewPath = $OldPath + ';' + $addme
Set-ItemProperty -Path "$Reg" -Name PATH -Value $NewPath
Now head to environment variables and check to see if it worked. Basically your just creating a variable to hold your original path and then appending your path onto it and then using set-itemproperty to change to its new value. If you need any syntax help type:
get-help *
or
get-help environment
Hope I helped!