Saturday, June 14, 2008

Ruby - Hello World

This Post is the first in a series of post about the Ruby programming languages.

For more information about Ruby I recommend this book: The Ruby Programming Language.

The best way to start any introduction to a new language is with the classic Hello World Program. At this point I assume you already have the ruby interpreter installed. If not you can download it from www2.ruby-lang.org

Once you have the interpreter create a file with the following contents:

puts "Hello World!"


Save the file as helloworld.rb, then execute ruby helloworld.rb. Your output will be "Hello World!"

No comments: