Keeping a bat open?

  Josquius 13:42 12 Dec 2006

I'm currently trying to program in ruby using a program called 'freeride'.
I'm having real trouble with running this- just clicking on the standard bat to open it it appears for a few brief seconds and then vanishes not giving me time to write anything.
Saving a txt file as a .rb then running that runs the code I wrote in the text editor however it then vanishes as soon as its done.

How would I ensure a bat file stays open even when it has finished running?

  Sethhaniel 13:48 12 Dec 2006

maybe if you put a space then ? after command it will await input

  Coff 15:44 12 Dec 2006

To keep a .bat file open, write Pause at the end.

  Josquius 21:56 12 Dec 2006

but there is nowhere to write pause.
It does not stay open long enough for aught to be wrote.

  Eric10 23:16 12 Dec 2006

For a guide to Ruby that may help you click here. It doesn't mean anything to me as I hadn't heard of Ruby before today but there is something about pausing using a method called 'gets' in the middle of chapter 4 under 'The Flipping Script'.

Another method I found involves creating a standard batch file to run the ruby program.

@echo off
c:\ruby\bin\ruby %1

You just run the batch file and append the name of your ruby file as in "batchfile.bat whatever.rb" but leave out the quotes.
The 'pause' makes the batch file wait until you press a key.

  fitshase 09:23 13 Dec 2006

If your using it in Windows, try using the command prompt (start\run\command).

It you run a bat file in windows it opens a command prompt window to run the file and then closes the window when done. Opening the command prompt window first means that when the bat file is finished you still have the prompt and window.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Honor 9 Lite review

How Sam Falconer transforms science and geology into digestible, elegant illustrations

HomePod review

Les meilleures séries Netflix (2018)