corg
corg

Reputation: 538

%SystemRoot% seems to break PATH (Windows 7)

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:

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

Answers (1)

rainkinz
rainkinz

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

Related Questions