The 'rails' command is not working on Windows XP

After a recent restart of my PC, when I tried to execute “ruby script/
server”, it gave me an error,

‘ruby’ is not recognized as an internal or external command,
operable program or batch file.

I also tried commands like “rails”, “gem”, “ri”, “irb”, “cap”,
“capify”, “rake” etc but OS refuses to recognise any of them.
Everything worked perfectly before last shutdown.

I even tried System Restore, but I get a message something like - “Can
not restore the system…”

I may understand that this message is not really related to Ruby-on-
Rails, but please let me know how to restore the commands i.e., how
can I make them work again. Or let me know if their is any better
place on web to raise this issue.

I’m using -
Windows XP Service Pack 2
“Ruby and friends” installed from latest release of Ruby-one-click-
installer.

-thanks.

On 14 May 2008, at 12:19, Vikrant wrote:

Sounds like your PATH environment variable is screwed.

Fred

Thanks, I also guessed the same with the help of a book.
But instead of asking why this happened (which I guess this is not the
right
place to ask),
I’m asking how to fix it.
Please let me know how to set that PATH variable to make it work like
before.
I guess that I should add C:\ruby\bin to environment path, but I’m not
sure
that it would make the ‘rails’, ‘cap’, ‘capify’ commands work, because
there
are no such file s like rails.exe, cap.exe or capify.exe in the
C:\ruby\bin
folder.
I need your advice.
-thanks for the reply.

2008/5/14 Frederick C. [email protected]:


-nasa
http://www.colourpark.net/people/vikrant_c/

On May 14, 1:33 pm, “Vikrant C.” [email protected] wrote:

Thanks, I also guessed the same with the help of a book.
But instead of asking why this happened (which I guess this is not the right
place to ask),
I’m asking how to fix it.
Please let me know how to set that PATH variable to make it work like
before.
You fiddle with something in the control panel. I don’t use windows so
don’t know anything more than that
I guess that I should add C:\ruby\bin to environment path, but I’m not sure
that it would make the ‘rails’, ‘cap’, ‘capify’ commands work, because there
are no such file s like rails.exe, cap.exe or capify.exe in the C:\ruby\bin

find out where gem puts the stub executables it creates and add that
to the path too.

Fred

thanks for the help.

2008/5/14 Frederick C. [email protected]:

lol i meant right click on the computer icon on the desktop

on the desktop i think you right click the desktop and open the
properties window and it should be in the enviroment variables area…
i only use a pc here at work and i dont play with any settings because
i hate the desktop support people…

im in the break room/ internet lab at work right now, these are
restricted machines so I’ll verify this when I get to my desk
upstairs… that should get you in the right direction though…

oh, and virkrant… finding the ‘why’ is usually the best way to fix
things. dont knock dude for tryin to help… and don’t forget that
you’re using google groups… you know, as in, google the search
company?

Thanks Ivizon,
Yes, I have been able to get to the Environment PATH settings, it lies
in
Control Panel -> System -> Advanced -> Environment Variables
However I can’t find C:\ruby\bin in that path.
I have been able to find the folders related to ‘cap’, ‘capify’ and
‘rails’
commands, but their paths are also absent from the Environment PATH.

And Ivizon, as you said, “find out why”, well,
I tried to search for this over web, in Microsoft Newsgroups and
Support
Centre but no luck.
Little I found was that PATH string gets truncated if it is longer than
1024
byte, but I don’t think this is the case.
I even tried to email Microsoft Support but they replied that though my
Windows XP Home Edition is genuine but it came pre installed on my PC,
so
they will charge for this support!
Anyway, I’m just not happy with my OS, it takes nothing less than 5
minutes
to start, nothing lesser to shutdown, and it often starts performing
slow
(though I have never seen that infamous Blue Screen of Windows).
At 512 MB of RAM it may not be able to run “Gears of War”, but it is I
guess
enough for an OS whose minimum requirement is 128 MB.
Anyway, I just gave up and now I’m going for a reinstall of my System.

Well, I also tried to switch to Linux, actually I have even Linux
installed,
but the biggest problem and only thing that is stopping me to switch to
Linux is that I don’t know how to connect to Internet with by Nokia GPRS
mobile via bluetooth on Ubuntu. I’m trying to learn Linux, but it should
take some time.

-thanks

2008/5/14 lvizon [email protected]:

http://www.google.com/search?source=ig&hl=en&rlz=&q=gprs+nokia+linux+bluetooth

Yes, last I remember that I had downloaded a torrent of a software,
which also had a trojan attached. Avast antivirus gave me a warning
but I ignored it cause I badly needed that software.

This issue seems to be resolved now, thank you all for the help.

On 5/15/08, bmosher [email protected] wrote:

C:\Sun\SDK\bin;D:\bin;c:\ruby\bin

Thanks Ivizon,
Little I found was that PATH string gets truncated if it is longer than
guess
-thanks

i only use a pc here at work and i dont play with any settings because

the

don’t know anything more than that
find out where gem puts the stub executables it creates and add

I also tried commands like “rails”, “gem”, “ri”, “irb”,

  • Show quoted text – Hide quoted text -
  • Show quoted text -


Sent from Gmail for mobile | mobile.google.com

-nasa
http://www.colourpark.net/people/vikrant_c/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs