QuickStart Ruby                                  

by George McNeal

Step-by-step instructions for learning to program in Ruby


 About the language                                                    

Name:

 Ruby

Year created:

February 24, 1993

Created by:

Yukihiro Matsumoto

Paradigm:

Object-oriented

Platform:

Developed on Linux, but works on many types of UNIX, DOS, Windows 95/98/Me/NT/2000/XP, MacOS, BeOS, OS/2

Domain:

Ruby can be used to write servers, to experiment with prototypes, and everyday programming tasks.  As a fully integrated object-oriented language, Ruby scales well.

Advantages:

Ruby is good at text processing.  Everything in Ruby is an object.

Disadvantages:

Lack of CPAN like library archive is a weakness.

Specification:

Core API  These are the API documents for the base classes and modules in the current stable release.

 

Grammar:

General Syntax Rules http://www.zenspider.com/Languages/Ruby/QuickRef.html#1

http://www.ruby-doc.org/docs/ruby-doc-bundle/Manual/man-1.4/syntax.html

 


Step 1. Download and install the latest stable release of Ruby

Step 2. Write a "hello world" program

Step 3. Interactive Tutorial
http://www.ruby.ch/tutorial/
 

 Learning more                                                        

There is a vast amount of information available on the Internet.  Some of the best sources are:

·       Learning Ruby

·       Programming Ruby

·       RubyGems A gem is a packaged Ruby application or library. It has a name (e.g. rake) and a version (e.g. 0.4.16). Gems are managed on your computer using the gem command. You can install, remove, and query (among other things) gem packages using the gem command. Get it from RubyForge and run (as root, if appropriate and necessary) ruby setup.rb It’s easy. It installs the required library files and the gem command. This command gives us the power to do everything else in this document, except distribute gems (for now!).

·       Ruby on rails Rails is a web-application and persistence framework that includes everything needed to create database-backed web-applications according to the Model-View-Control pattern of separation. This pattern splits the view (also called the presentation) into "dumb" templates that are primarily responsible for inserting pre-built data in between HTML tags. The model contains the "smart" domain objects (such as Account, Product, Person, Post) that holds all the business logic and knows how to persist themselves to a database. The controller handles the incoming requests (such as Save New Account, Update Product, Show Post) by manipulating the model and directing data to the view Here’s how you install Rails using Ruby Gems: Get hold of RubyGems 0.8.11 (or higher)

Back to QuickStart Languages