From: Luis Lavena Date: 2010-05-13T20:50:56+09:00 Subject: Re: help to run Ruby On May 13, 8:31 am, "balzer" wrote: > "Thomas Volkmar Worm" wrote in messagenews: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: > Using the mswin32 downloads form ruby-lang requires you additional instructions, as noted in the ruby-lang download page: http://www.ruby-lang.org/en/downloads/ "Please note that some of the above binaries will require manual download and installation of additional components detailed on this page. Please ensure you’ve followed/performed these steps prior reporting a bug." And if you keep reading: "The RubyInstaller does not require these additional tasks." The RubyInstaller binaries are here: http://rubyinstaller.org/ -- Luis Lavena