Ruby - weird behaviour after added to PATH

77 Views Asked by At

I really don't understand what's the hell is going on.

It seems that Ruby is already in the PATH variable, but sometimes it work, sometimes - not. I tested it with ruby -v.

If I launch cmd.exe via "Run" command (Win+R), it will be opened in C:\Users\John directory. ruby -v will work there. Then, if I type cd c:\, and then type ruby -v - it still works. However, if I open explorer window, right click on drive C and select "Open CMD here" - ruby -v will not work!

'ruby' is not recognized as an internal or external command...

Another programs added to PATH, like Python and MultiMarkdown works OK. So, it seems some error with Ruby installation? I tried to reinstall it, but it doesn't helped.

Ruby+Devkit 2.4.4-2 (x86)

Update based on comments

Here is screenshot:

enter image description here

C:\Ruby24\bin is already added to both places. It is also shown if I type path in my cmd.exe.

Update 2

This is what I have in the 1st field in the screenshot above:

C:\Ruby24\bin;
C:\Python33;
C:\Python33\Scripts;
C:\Users\John\AppData\Local\Pandoc\;
C:\Users\John\AppData\Roaming\npm

-----

This is what I have in the 2nd field in the screenshot above
(and the same if I type "path" in my cmd.exe):

C:\Program Files\ImageMagick-6.9.2-Q16;
C:\ProgramData\Oracle\Java\javapath;
C:\Program Files\iis express\PHP\v5.4;
C:\Python33\;
C:\Program Files\NVIDIA Corporation\PhysX\Common;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files\MySQL\MySQL Server 5.1\bin;
C:\Program Files\SourceGear\Common\DiffMerge\;
C:\Program Files\Calibre2\;
C:\Ruby24\bin;
C:\Users\John\AppData\Local\Pandoc\;
C:\Python33\Scripts;
C:\ProgramData\chocolatey\bin;
C:\Program Files\nodejs\
0

There are 0 best solutions below