LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to evoke Ruby? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-evoke-ruby-4175628109/)

grumpyskeptic 04-21-2018 03:41 AM

How to evoke Ruby?
 
My OS is Linux Mint 17.3 Rosa Cinnamon. The computer tells me that I already have the Ruby interpreter version 1.9.1 or perhaps version 1.9.3 installed.

But I cannot see how to start it running. It is not to be found anywhere in the desktop menu. When I type in 'ruby' in the console and press return, I just get a new blank line. When I then type in for example '2 + 2' and press return, I get another new blank line.

Thanks.

pan64 04-21-2018 03:49 AM

and what will happen if you enter:
2+2=

grumpyskeptic 04-21-2018 03:57 AM

In the console I typed in 'ruby' return, then typed in '2+2=' return and it responded:

"-:1: syntax error, unexpected '=', expecting $end"

So is that Ruby?

Thanks.

Edit/update: a web-search indicates that it is indeed Ruby.

Is is customary to use an IDE for Ruby? Which is the most popular one for Ruby when using Linux? Thanks again.

pan64 04-21-2018 04:22 AM

yes, that is ruby.
you might want to start here: https://www.tutorialspoint.com/ruby/index.htm, or here: https://www.ruby-lang.org/en/documentation/quickstart/

grumpyskeptic 04-21-2018 11:02 AM

Thanks.

It seems to be better to type 'irb' in the console rather than 'ruby'.

This https://www.ruby-lang.org/en/documentation/quickstart/ gives a 20 minute introduction to Ruby.

pan64 04-21-2018 12:03 PM

Glad to help you.
If you really want to say thanks just click on yes.


All times are GMT -5. The time now is 03:38 PM.