Before trying to develop Ruby you must download it Download Ruby. After you download it open up the IRB. This can be accessed in the Start Menu folder as "Interactive Ruby"
Now you will see it says
irb(main):001:0>
Now do not simply type "Hello World", even though it will output the Hello World it isn't outputting it, it's just saying the result of what we gave it, so it isn't really printing Hello World.
Now type
puts "Hello World"
This is the classic Hello World program in Ruby, it is extremely short and simple. The keyword "puts" tells Ruby to print out the next part of the code in quotation marks. The "=> nil" is the result of the expression, which is Ruby's nothing. This is the most basic program in Ruby.
Again this is a tutorial for those who are interested in seeing what Ruby looks like or want to begin learning to code it. If this tutorial helped you please let me know, and if you don't like it please don't post unless giving constructive criticism.


Sign In
Create Account




Back to top









