From: balzer Date: 2010-05-13T20:35:16+09:00 Subject: Re: help to run Ruby "Thomas Volkmar Worm" wrote in message news:850qlfFd63U1@mid.uni-berlin.de... > 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 --------------------- I use Ruby without installer, ruby-1.8.7-p72-i386-mswin32 Just tried to run script , but got error: "The application has failed to start because SSLEAY32.dll was not found. Reinstalling the application may fix this problem." Here is part of output printed in DOS window: e:/ruby/lib/ruby/1.8/i386-mswin32/openssl.so: 126: The specified module could no t be found. - e:/ruby/lib/ruby/1.8/i386-mswin32/openssl.so (LoadError) from e:/ruby/lib/ruby/1.8/openssl.rb:17 from ../../parser/signature.rb:22:in `require' from ../../parser/signature.rb:22 from ../../parser/pdf.rb:47:in `require' from ../../parser/pdf.rb:47 from ../../parser/parser.rb:24:in `require' from ../../parser/parser.rb:24 from embed.rb:5:in `require' from embed.rb:5 Thank you.