Command line

Please forgive this stupid newb question but I thought it was possible
to send a command to the ruby interpreter without using IRB.
ruby puts “hello”

This command just returns an error that there is no file or directory
called hello.
Running Ruby 1.9.1

Help please.

On Mon, Sep 14, 2009 at 8:45 PM, Rong [email protected] wrote:

Please forgive this stupid newb question but I thought it was possible
to send a command to the ruby interpreter without using IRB.
ruby puts “hello”

ruby --help

There is nothing in ruby --help to answer my question.

On Sep 14, 10:55 pm, Hassan S. [email protected]

Thank you. I did not understand that the entire command had to be
quoted.

On Mon, Sep 14, 2009 at 11:17 PM, Rong [email protected] wrote:

On Tue, Sep 15, 2009 at 12:45 PM, Rong [email protected] wrote:

Help please.

http://www.rubycentral.com/pickaxe/preface.html#UB

Harry

Ron G. wrote:

Please forgive this stupid newb question but I thought it was possible
to send a command to the ruby interpreter without using IRB.
ruby puts “hello”

This command just returns an error that there is no file or directory
called hello.
Running Ruby 1.9.1

Help please.

Im not sure if you figured out your problem… but here is my help…
http://www.ruby-lang.org/en/documentation/quickstart/

On 2009-09-15, Rong [email protected] wrote:

There is nothing in ruby --help to answer my question.

There is.

Maybe you should narrow the field a bit:

$ ruby --help | grep command

-s

On Mon, Sep 14, 2009 at 9:17 PM, Rong [email protected] wrote:

There is nothing in ruby --help to answer my question.

Are you sure?

’ -e ‘command’ one line of script. Several -e’s allowed. Omit
[programfile]’

On Sep 15, 1:16 am, Bigmac T. [email protected] wrote:

Im not sure if you figured out your problem… but here is my help…Ruby in Twenty Minutes

Posted viahttp://www.ruby-forum.com/.

You could always just use an IDE like NetBeans: http://www.netbeans.org/

On Sep 15, 5:40 pm, Greg D. [email protected] wrote:

On Tue, Sep 15, 2009 at 8:35 AM, justathoughtor2 [email protected] wrote:

You could always just use an IDE like NetBeans:http://www.netbeans.org/

You could always just learn the API.


Greg D.http://destiney.com/

Was that intended as an insult? I was merely trying to help the best
way I knew how. I don’t use the command line. I think it takes too
long.

2009/9/16 justathoughtor2 [email protected]:

On Sep 15, 5:40 pm, Greg D. [email protected] wrote:

On Tue, Sep 15, 2009 at 8:35 AM, justathoughtor2 [email protected] wrote:

You could always just use an IDE like NetBeans:http://www.netbeans.org/

You could always just learn the API.

Was that intended as an insult? I was merely trying to help the best
way I knew how. I don’t use the command line. I think it takes too
long.

It seems a lot of us use command line Ruby because they consider it
faster. :slight_smile: I guess Greg considered it a bit too heavy weight to
use an IDE for “hello”. Btw, the OP specifically asked how to make
Ruby print “hello” from the command line - so “use an IDE” is not
exactly an answer to that question.

Kind regards

robert

On Tue, Sep 15, 2009 at 8:35 AM, justathoughtor2
[email protected] wrote:

You could always just use an IDE like NetBeans: http://www.netbeans.org/

You could always just learn the API.