First off, you'll need to install the Ruby interpreter, which
should be in your package manager's repositories. You'll also want
to install Irb, the interactive Ruby interpreter, which is supplied
in a separate package in some distros.
"Once these things have been installed, fire up an interactive
Ruby session by entering irb at a shell prompt. This will pop up a
prompt for you to start entering Ruby statements. It's almost law
that every coding guide starts with a Hello World instruction, but
we'll bend the rules a little here. Run
puts "Goodbye moon!"
"That's pretty self-explanatory - puts outputs the supplied
string to the screen. However, one of the most crucial features of
Ruby to note is that everything is an object. Yes, even literal
strings. It's pretty weird, but it enables you to do things
Some of the products that appear on this site are from companies from which QuinStreet receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. QuinStreet does not include all companies or all types of products available in the marketplace.