From: Charles Roper Date: 2010-09-17T02:27:54+09:00 Subject: Re: Running a .rb file under Windows (beginner's question) Assuming you installed Ruby using the RubyInstaller package, look in the Start Menu for Ruby 1.9.2-p0 and select "Start command prompt with Ruby". Now change directory (CD) to where your Hello.rb file resides; i.e., type this and hit return: cd "C:\Documents and Settings\brazee\My Documents\Code\Ruby\" Now type Hello.rb and you should get the output of your program. Alternatively, you can type: ruby Hello.rb Hope that helps. Charles On 16 September 2010 17:55, Howard Brazee wrote: > I just installed Ruby on a Windows XP machine.   At the start of the > path is: > C:\Ruby192\bin; > > I created > C:\Documents and Settings\brazee\My Documents\Code\Ruby\Hello.rb > > > How do I run it?   When I look at it in explorer, it has a Ruby icon. > > I cut and pasted a ruby program from the Web - but I suspect the first > line doesn't fit this environment. > > (I'm going to try at home on my Mac and expect I'll have to make a > change to that line there as well). > > -- > "In no part of the constitution is more wisdom to be found, > than in the clause which confides the question of war or peace > to the legislature, and not to the executive department." > > - James Madison > >