From: James Britt Date: 2006-03-26T04:49:20+09:00 Subject: Re: Really basic Ruby question paul.denlinger@gmail.com wrote: > I'm learning Ruby from the Learn to Program tutorial by Chris Pine. > > On http://pine.fm/LearnToProgram/?Chapter=01, he mentions saving a > calc.rb file after typing in "puts 1 + 2" in my text editor , then > going to the command line and typing "ruby calc.rb", and getting the > results "3" returned. > > I am not getting this result; instead I'm getting a message that the > file or directory can't be found. I'm using the built-in Scintilla text > editor which comes with Ruby. > > How do I get the command line to see the saved file? You may be opening the command prompt in some default home directory, which is not the same place where you saved the Ruby file. When you save the file in Scintilla, make sure you save it to c:\calc.rb Then, when you get a command prompt, go to the C: drive, then change to the root drive: c:\> cd \ Then try running ruby calc.rb. If that works, all is good. You will probably be able to run it by just typing the file name and hitting Enter, too, if the Ruby installation set up the filetype execution association for you. Now, I don't generally advocate saving your files to the root of the C: drive, so decide where you want to place the files, and then just figure out how to navigate there once you have a command prompt. -- James Britt "In Ruby, no one cares who your parents were, all they care about is if you know what you are talking about." - Logan Capaldo