For Windows users only

From: Hal E. Fulton [mailto:hal9000@hypermetrics.com]

From: “Brian D. Baker” baker.921@osu.edu

Hal E. Fulton wrote:

At the command line, that is.

Problem: When you run a .rb file from the
command line, you have to type a (potentially
lengthy) command.

Run msconfig from Start Menu->Run. Under the “Environment” tab of
the

program that opens, there is a variable called PATH. The value of
path

is a semicolon delimited list of directories. Add C:\RUBY\BIN (or
whatever directory holds ruby.exe on your computer) to the PATH
variable

and apply the changes. You might have to restart, but you won’t have
to

type the full path to ruby ever again!

Thanks. I’m well familiar with PATH. But I don’t
like typing this sort of thing:

ruby -Ithis -Ithat -Ithe_other myprog.rb

But I don’t want to put everything in RUBYLIB,
either.

Basically I was trying to

  1. Just type “myprog”
  2. Get Windows to honor the #! line
  3. Avoid the problems with batch files

I know: I should just run Linux all the time…

Look up the assoc and ftype commands and the pathext environment
variable. (It will let you type just myprog, you don’t even have to type
myprog.rb )

– bjorn

Look up the assoc and ftype commands and the pathext environment
variable. (It will let you type just myprog, you don’t even have to type
myprog.rb )

I don’t think Win98 knows what to do with PATHEXT.

James

···

– bjorn

Right, nor does it have assoc or ftype.

Hal

···

----- Original Message -----
From: " JamesBritt" james@jamesbritt.com
To: “ruby-talk ML” ruby-talk@ruby-lang.org
Sent: Friday, August 16, 2002 6:36 PM
Subject: RE: For Windows users only…

Look up the assoc and ftype commands and the pathext environment
variable. (It will let you type just myprog, you don’t even have to type
myprog.rb )

I don’t think Win98 knows what to do with PATHEXT.