Hi, a stupid question. I save my scripts in a text editor but in which
directory/file do i save them to run from the command line. It just
gives me an error message when I type - ruby program.rb.
Hi, a stupid question. I save my scripts in a text editor but in which
directory/file do i save them to run from the command line. It just
gives me an error message when I type - ruby program.rb.
Cheers
What is the exact error message? Can you start irb?
If you can't, possibly your OS isn't able to find the ruby executable. If you can, are you in the directory where your ruby script is located?
If Windows OP you can put your files anywhere. Just write your file path to the drive and folder then press enter.
Then ruby and file name .rb.
Or put your ruby program on the desktop and write into the command prompt cd desktop and press enter key. You should then be on the desktop which means you can then write ruby and your program file name .rb and press the enter key.
Take a look at some basic ruby @ http://www.oldkingjames.org
···
Date: Fri, 19 Apr 2013 22:49:53 +0900
From: lists@ruby-forum.com
Subject: where do i put scripts to run them from the command line
To: ruby-talk@ruby-lang.org
Hi, a stupid question. I save my scripts in a text editor but in which
directory/file do i save them to run from the command line. It just
gives me an error message when I type - ruby program.rb.