2

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\
john c. j.
  • 725
  • 5
  • 28
  • 81
  • Are you sure `ruby.exe` is in your path? It's worth checking manually. – tadman Aug 11 '18 at 19:16
  • @tadman Yes, I checked. I will update my question in a few minutes. – john c. j. Aug 11 '18 at 19:17
  • @tadman I added screenshot and some text info. – john c. j. Aug 11 '18 at 19:25
  • Screenshots are almost always the worst way to show this information. I can't scroll to see the rest of that string, for example. Can you copy-paste the exact text into an edit on your question? Can you also verify in the command-line that `PATH` is set correctly? – tadman Aug 11 '18 at 19:26
  • @tadman I added it to question. – john c. j. Aug 11 '18 at 19:37
  • Possible duplicate: https://superuser.com/questions/445608/windows-7-open-command-window-here-not-getting-updated-path-variable – Tom Lord Aug 11 '18 at 19:39
  • If you can run `C:\Ruby24\bin\ruby` then that should work and if it's not doing that I'm stumped. – tadman Aug 11 '18 at 19:40
  • And @johnc.j. as per the comments above, I don't actually know whether the ruby folder is in your `PATH`. Have you tried checking its value from **inside the terminal**? This sounds like a bug with Windows not setting the `PATH` when clicking "open CMD here"; not really a bug in ruby at all. – Tom Lord Aug 11 '18 at 19:42
  • @TomLord Thank you. Yes, reboot helped. – john c. j. Aug 11 '18 at 19:52
  • Move the Ruby entry to the top of each list, might hopefully solve problem. It searches in order of that list. Another file/folder in the other entries might have the name `ruby` and screwing it up. Although it appears it should be using the current user and not the system variable unless you running as admin, it is worth a try without any consequence. – ForeverZer0 Aug 11 '18 at 23:35
  • @ForeverZer0 See previous comment. It was necessary to reboot. This question should be closed as duplicate. – john c. j. Aug 11 '18 at 23:41
  • @johnc.j. Oops, didn't see that, the comments weren't expanded :P – ForeverZer0 Aug 11 '18 at 23:45

0 Answers0