Keeping a bat open?

  Josquius 13:42 12 Dec 06
Locked

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 06

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

  Coff 15:44 12 Dec 06

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

  Josquius 21:56 12 Dec 06

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

  Eric10 23:16 12 Dec 06

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
pause

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 06

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.

Intel Coffee Lake 8th-gen Core processors release date rumours

1995-2015: How technology has changed the world in 20 years

Framestore’s haunting post-WWII title sequence for new BBC series SS-GB

Best iPhone games 2017 | Best iPad games 2017: 162 fantastic iOS games that you need to play right…