Reputation: 538
The default PATH for Windows 7 is:
%SystemRoot%\System32; %SystemRoot%; %SystemRoot%\System32\Wbem
When my PATH environment variable is
%SystemRoot%; C:\Web\Ruby1.9.3\bin; C:\Web\Ruby1.9.3;
and I run ruby-v
from the command-line, it states:
'ruby' is not recognized as an internal or external command, operable program or batch file
When my PATH is instead
C:\Web\Ruby1.9.3\bin; C:\Web\Ruby1.9.3;
and I run ruby -v
, the correct Ruby version is returned:
ruby 1.9.3p392 (2013-02-22) [i386-mingw32]
Does anyone have a clue what's going on here?
NOTE:
%SystemRoot%
to the RIGHT of my Ruby path makes ruby work, but SystemRoot functions aren't recognized (for example, write.exe). %SystemRoot%
is C:\windows
. The default setting for Windows 7. I tried correcting the capitalization, but this didn't fix the issue.%SystemRoot%\System32; %SystemRoot%; %SystemRoot%\System32\Wbem
. I tried adding this back, but this also didn't fix the issue.In case a little context helps: I have been developing Ruby/Rails for months now and there was no issue until last week, when suddenly something screwed up, about the time that I started looking into MongoDB.
Upvotes: 1
Views: 2355
Reputation: 10393
How are you setting the path? I think you need to lose the quotes and spaces. i.e.
set path=%SystemRoot%;C:\Web\Ruby1.9.3\bin;C:\Web\Ruby1.9.3;
Upvotes: 1