I installed ruby186-27_rc2.on windows xp and how get an error ruby is not recognized as an internal or external command operable program or batch file.
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. ruby-commands-don-t-work.doc
I have resoled that problem. I have ruby working correctly, it turned out the problem was the PATHEXT somehow I had deleted everything but RB & RBW, so once that was fixed I was in good shape.
However being the inexperienced person that I am I have now moved on to a different problem. I will attach the text file that I am trying to read with the script and paste the script below. If you have time to look at it I would appreciate it. Basically it looks as if it recognizes the text file but does not read or display the contents.
my_path = "C:\\Ruby\\Text\\"
warnings = 0
error = 0
d = Dir.new(my_path)
d.each do |fl|
unless fl == '.' or fl == '..' then
puts my_path + fl
File.open(my_path + fl, "r").each do |line|
if line =~ /ERROR/ then
error += 1
elsif line =~ /WARNING/ then
warning += 1
end
end
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Administrator>pat
PATH=C:\Ruby\bin;C:\Progra
DataBinder7\Redist7\cpp\wi
m Files\Common Files\Roxio Shared\DLLShared\;C:\Progr
er\80\Tools\Binn\;C:\Progr
m Files\Microsoft SQL Server\90\DTS\Binn\;C:\Pro
90\Tools\Binn\VSShell\Comm
mmon7\IDE\PrivateAssemblie
n\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Pr
t SQL Server\100\Tools\Binn\VSSh
al Studio 9.0\Common7\IDE\PrivateAss
ll\v1.0;C:\Program Files\VMware\Infrastructur
ogram Files\Pinnacle\Studio 11;C:\Program Files\Pinnacle\Studio 11\Plugins;;C:\P
rogram Files\e\cmd;C:\Program Files\Pinnacle\Shared Files;C:\Program Files\Pinna
cle\Shared Files\Filter
C:\Documents and Settings\Administrator>