From: Alex DeCaria Date: 2010-02-21T10:33:40+09:00 Subject: Re: Specifying Ruby Version from Command Line Eustáquio Rangel wrote: > 2010/2/20 Alex DeCaria : >> I have two versions of Ruby installed (1.8 and 1.9). �When starting a >> Ruby script from the command window, how do I specify which version of >> Ruby I want to use? � I'm assuming there is some option for this that I >> can set, but I don't know what it is. > > What OS are you running, and how did you install both versions? I am using Windows 7 Professional (64-bit). I previously had Ruby 1.8.6 installed using the old 1-click installer. I then installed Ruby 1.9 using the windows installer found at RubyIntaller.org. The Ruby 1.9 is automatically installed in a different directory (C:\Ruby19 instead of C:\Ruby) so the two installs are independent. I have made Ruby 1.9 the default (it is the only one in my Path). So, as was suggested earlier, to run a Ruby 1.8 program I just issue the command 'C:\Ruby\bin myprogram.rb'. To run a Ruby 1.9 program I just do 'ruby my program.rb' It is working great. Thanks everyone! --Alex -- Posted via http://www.ruby-forum.com/.