Can't run ruby commands from windows command prompt

I have installed ruby186-27_rc2.exe on windows XP. I have installed it
as user with admin permissions, and as the administrator. I uninstalled
it program completely removing all entries from registry. removing ruby
directory and making sure that all entries are removed from environment.
I have tried this several times, Each time I install it it appears to
install correctly, it is in the environment path but I continue to get
the following error "ruby is not recognized as an internal or external
command operable program or batch file.

On Feb 28, 1:59 pm, Brad W. [email protected] wrote:

This message:

“ruby is not recognized as an internal or external command operable
program or batch file.”

Means ruby is not in your PATH.

If you installed Ruby as administrator, it should have modified your
PATH. For the change take effect you will need to logout and login
again to be able to use the command prompt.

Also, ensure that PATH contains the bin folder where ruby was
installed (by default C:\Ruby\bin)

So:

C:>set PATH

Should display the current path. Look for Ruby\bin in it.

If not, you will need to add manually from the system properties:

Start → Settings → Control Panel. Double click on System. Go to
Advanced tab, and then Environment variables option.

From there append the Ruby path to the end of the PATH system
variable.

After it, hit Ok and logout.

HTH,

Luis L. wrote:

On Feb 28, 1:59�pm, Brad W. [email protected] wrote:

This message:

“ruby is not recognized as an internal or external command operable
program or batch file.”

Means ruby is not in your PATH.

If you installed Ruby as administrator, it should have modified your
PATH. For the change take effect you will need to logout and login
again to be able to use the command prompt.

Also, ensure that PATH contains the bin folder where ruby was
installed (by default C:\Ruby\bin)

So:

C:>set PATH

Should display the current path. Look for Ruby\bin in it.

If not, you will need to add manually from the system properties:

Start → Settings → Control Panel. Double click on System. Go to
Advanced tab, and then Environment variables option.

From there append the Ruby path to the end of the PATH system
variable.

After it, hit Ok and logout.

HTH,

I did exactly what you said to do. I had already done this several times
but I wanted to be sure. But like before I am still receive the same
error. The bin directory, is in the ruby directory and that is how it
shows in the path. I am not sure why it displays the C:\ruby\bin in that
location of the path, because I did append it to the end.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Brad>set path
Path=C:\Program Files\Liquid Technologies\Liquid XML Studio
2009\XmlDataBinder7
Redist7\cpp\win32\bin;C:\Program Files\QuickTime\QTSystem;C:\Program
Files\Comm
on Files\Roxio Shared\DLLShared;C:\Program Files\Microsoft SQL
Server\80\Tools
Binn;C:\Program Files\Microsoft SQL Server\90\Tools\binn;C:\Program
Files\Micr
osoft SQL Server\90\DTS\Binn;C:\Program Files\Microsoft SQL
Server\90\Tools\Bin
n\VSShell\Common7\IDE;C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\Pr
ivateAssemblies;C:\Program Files\Microsoft SQL
Server\100\Tools\Binn;C:\Progra
m Files\Microsoft SQL Server\100\DTS\Binn;C:\Program Files\Microsoft
SQL Server
\100\Tools\Binn\VSShell\Common7\IDE;C:\Program Files\Microsoft Visual
Studio 9.
0\Common7\IDE\PrivateAssemblies;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\P
rogram
Files\VMware\Infrastructure\VIToolkitForWindows\Scripts;C:\Program
Files
Pinnacle\Studio 11;C:\Program Files\Pinnacle\Studio
11\Plugins;C:\Ruby\bin;C:\Pr
ogram Files\Pinnacle\Shared Files;C:\Program Files\Pinnacle\Shared
Files\Filter
PATHEXT=.RB;.RBW

C:\Documents and Settings\Brad>cd c:\ruby

C:\Ruby>dir
Volume in drive C has no label.
Volume Serial Number is B8CA-99FC

Directory of C:\Ruby

02/28/2009 04:58 PM .
02/28/2009 04:58 PM …
02/28/2009 04:57 PM bin
11/19/2008 03:30 PM 11,828 ChangeLog.txt
02/28/2009 04:55 PM doc
02/28/2009 04:55 PM lib
11/24/2007 03:43 PM 4,305 LICENSE.txt
02/28/2009 04:56 PM man
08/12/2008 04:28 AM 605,760 MANIFEST
02/28/2009 04:56 PM misc
08/12/2008 04:20 AM 1,282 README.1st
11/19/2008 03:30 PM 4,932 ReleaseNotes.txt
11/19/2008 03:24 PM 4,286 ruby.ico
02/28/2009 04:58 PM 6 rubyopt.del
11/19/2008 03:24 PM 4,286 rubyw.ico
02/28/2009 04:56 PM samples
02/28/2009 04:57 PM scite
02/28/2009 04:56 PM share
02/28/2009 04:57 PM src
02/28/2009 04:58 PM 53,826 uninstall.exe
9 File(s) 690,511 bytes
11 Dir(s) 73,615,704,064 bytes free

C:\Ruby>cd bin

C:\Ruby\bin>dir
Volume in drive C has no label.
Volume Serial Number is B8CA-99FC

Directory of C:\Ruby\bin

02/28/2009 04:57 PM .
02/28/2009 04:57 PM …
11/19/2008 03:30 PM 3,880 erb
11/19/2008 03:30 PM 168 erb.bat
11/19/2008 03:30 PM 24 fxri.bat
11/19/2008 03:30 PM 245 fxri.rbw
11/19/2008 03:30 PM 21,504 gdbm.dll
11/19/2008 03:20 PM 862 gem
11/19/2008 03:30 PM 143 gem.bat
02/28/2009 04:57 PM 31 gemhelp.bat
11/19/2008 03:26 PM 237,568 glut32.dll
11/19/2008 03:26 PM 28,728 glut32.lib
11/19/2008 03:30 PM 872,448 iconv.dll
11/19/2008 03:30 PM 6,144 iconv.exe
11/19/2008 03:30 PM 158 inputrc.euro
11/19/2008 03:30 PM 377 irb
11/19/2008 03:30 PM 168 irb.bat
11/19/2008 03:24 PM 1,077,248 libeay32.dll
11/19/2008 03:26 PM 151,552 libexpat.dll
11/19/2008 03:26 PM 151,552 libexpatw.dll
11/19/2008 03:29 PM 53,248 libfcgi.dll
08/12/2008 04:20 AM 892,998 msvcrt-ruby18.dll
11/19/2008 03:24 PM 282,624 openssl.exe
11/19/2008 03:30 PM 72,192 pdcurses.dll
11/19/2008 03:27 PM 4,593 proxyserver.rb
11/19/2008 03:21 PM 404 rake
11/19/2008 03:30 PM 144 rake.bat
11/19/2008 03:30 PM 1,541 rdoc
11/19/2008 03:30 PM 169 rdoc.bat
11/19/2008 03:30 PM 136,192 readline.dll
11/19/2008 03:30 PM 1,489 ri
11/19/2008 03:30 PM 167 ri.bat
08/12/2008 04:20 AM 20,541 ruby.exe
08/12/2008 04:20 AM 20,542 rubyw.exe
11/19/2008 03:27 PM 11,269 sqlsh.rb
11/19/2008 03:24 PM 200,704 ssleay32.dll
11/19/2008 03:30 PM 151 testrb
11/19/2008 03:30 PM 171 testrb.bat
11/19/2008 03:20 PM 59,904 zlib1.dll
37 File(s) 4,311,843 bytes
2 Dir(s) 73,615,626,240 bytes free

C:\Ruby\bin>

I don’t think you really wanted to remove .exe from the PATHEXT
variable.

Or you would have to run ruby as ruby.exe. I’m not sure if this is
related to your problem though.

PATHEXT=.RB;.RBW

I don’t think you really wanted to remove .exe from the PATHEXT
variable. It seems something has gone wrong when changing that
variable.

PATHEXT could look like this (win xp):
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW;.py;.pyw;.tcl

Leo wrote:

PATHEXT=.RB;.RBW

I don’t think you really wanted to remove .exe from the PATHEXT
variable. It seems something has gone wrong when changing that
variable.

PATHEXT could look like this (win xp):
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW;.py;.pyw;.tcl

Leo thank you that solved the problem, I can’t believe I gig not notice
that. I guess sometime you can’t see the tree for the forest. Regardless
excellent job.

Brad