views:

375

answers:

2

Hello I installed cygwin on Windows XP so I can use Unix command in Console2. I also installed Ruby on Rails without much of problem. Then I tried to run the 'ruby /script/server' command, and I got the following error:

$ ruby /script/server
c:\ruby\bin\ruby.exe: No such file or directory -- /script/server (LoadError)

In order to access any files or drives on Cygwin, I know I have to prepend the path with \cygdrive. So that must be causing the problem. However I don't know how to make Rails aware that \cygdrive\ has to be prepended in front.

Also, if there is a better way to do Rails development on Windows environment, please let me know. I've been riding Rails on OSX, and it's the first time on Windows. So I'm used to the unix commands and I'd like to keep using them on Windows as well.

+1  A: 

The command should be:

ruby script/server

The leading '/' will look for the file in the root directory instead of your current directory.

guitsaru
oops, can't believe I did that xDThank you!
mr.flow3r
+1  A: 

This doesn't answer your question about Cygwin but more your last part about other ways to do Rails on Windows. I understand you wanting to use the command line options, although there is some pretty good IDE support available on Windows. I just recently switched to Netbeans 6.7 with the built in Ruby bundle. I have to say it works very well so far. I had been using Aptana but I wouldn't recommend it (way to buggy). But I understand if you aren't keen on using an IDE (especially if that is what you are used to on Mac) - it worked for me but I came from Java so I actually like having my security blanket (er..I mean IDE).

Uplate
I see. Never heard of Netbeans before. I will definitely check it out :) Thanks for the info.
mr.flow3r