From: Dennis Sutch Date: 2002-01-29T10:19:09+09:00 Subject: Re: ruby for DOS I don't have any experience with the version of ruby that you are using, nor with using any version under DR-DOS, but I have experienced the same type of problem. That said, here is how I solved it -- YMMV. To get a simple "Hello, World" type of script to work under DOS, I did this: @echo off ruby -Sx "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 goto endofruby #!ruby puts "Hello, DOS user\n"; __END__ :endofruby This script works well for me under Windows ME when saved as "hello.bat" and executed as "hello.bat" from the C prompt. Under Windows 2000, I was able to improve this script by changing this line: ruby -Sx "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9 to: ruby -Sx "%~nx0" %* When this modified script is saved as "hello.bat" it can be executed as either "hello.bat" or "hello" from the C prompt. To get IRB to work under DOS, I modified the original irb.bat file to use the above DOS batch code. Another option that I initially used was to copy irb.bat to irb and modify irb.bat to run ruby using something like: ruby -Sx "irb" %1 %2 %3 %4 %5 %6 %7 %8 %9 Good luck. "Larry Forrister" wrote in message news:3C4E90E0.6070302@di1.net... > Hi all, > > I am trying to use ruby under DR-DOS 7.03 ( aka Caldera DOS / Novell DOS ) > I am using the precompiled version downloaded from > http://www.ruby-lang.org/~eban/ruby/binaries/djgpp/ > > C:> ruby -v > ruby 1.6.6 (2001-12-26) [i386-msdosdjgpp] > > The problem is when I try run irb I get the results shown below. I can > run my own 'hello world' type scripts without trouble. The irb file of > course exists at the specified location. The DOS path contains in part: > c:\usr\local\bin ; > > Does anyone know how to get this working? > Thanks > ~~LF > > C:> ruby c:\usr\local\bin\irb > C:/USR/LOCAL/lib/ruby/1.6/irb.rb:16:in `require': No such file to load > -- irb/extend-command (LoadError) > from C:/USR/LOCAL/lib/ruby/1.6/irb.rb:16 > from c:/usr/local/bin/irb:10:in `require' > from c:/usr/local/bin/irb:10 > >