BTW: If you use 4nt from jpsoft, which is a cmd.exe replacement,
you can do the following:
set PATH=E:\Ruby\bin;E:\Ruby\myprogram-beta1\sources\scripts\embed;%PATH%
set .rb=ruby.exe
The last one says, treat ruby scripts as executables through ruby.exe.
lets say, your script is myprog.rb then you can call it like this:
C:> myprog
But if the path to your prog only contains one ruby script worth starting
directly, it does not make much sense to put its directory into PATH.
Then you could setup an alias to achieve the same:
alias myprog=E:\Ruby\myprogram-beta1\sources\scripts\embed\myprog.rb
get 4nt. jpsoft has a free version and it is really worth testing. On
windows I use it for years.
4nt has a file 4start.btm (or so) where you can put such settings in.
Then when you start 4nt, everything is setup automatically. Another nice
thing about 4nt: It comes with an installer, but you can take the 4nt-
directory and move it somewhere else, eg. onto an usb-stick. This way I
run a full sack of software: ruby, perl, python, java, php, mysql,
apache, firefox, thunderbird, openoffice and another 50-100 open source
software packages.
But if you want to stick with cmd.exe, you could do it this way:
make a bin-folder lets say in E:\bin and put it into PATH
set PATH=E:\Ruby\bin;E:\bin;%PATH
Then but a bat-file into E:\bin with the name of your prog, myprog.bat:
--- snip ---
@echo off
setlocal
ruby E:\Ruby\myprogram-beta1\sources\scripts\embed\myprog.rb %*
--- snip ---
%* passes all the arguments you give to the bat-file to your ruby script.
now you can call your prog
C:> myprog
Thomas