Introduction to Ruby Programming

What to expect -

Learn some basic ideas, basic commands, and to develop small programs. Also gain some confidence in developing mini-projects.

What not to expect -

Mastering a whole new object-oriented programming language

what is ruby and what can it be used for?

  • It is a scripting language
  • It is an object-oriented programming language
  • Can be used for testing applications
  • Can be used to develop internet applications
  • Can be used in any platform
  • Open source, you can add new components, modules
  • Comes with big library

    Ruby is popularly used for database-driven web development

    Some useful websites on Ruby

    Book Reference

    Programming Ruby
    The Pragmatic Programmer's Guide, Second Edition
    Dave Thomas, with Chad Fowler and Andy Hunt
    Pages: 864
    ISBN: 0-9745140-5-5

    Two ways to run ruby programs

    In the command prompt [open the x-terminal window]
    $ruby filename.rb


    Invoke an interactive ruby shell like "irb"

    >> [type commands here]

    In Windows you can open "fxri" - an interactive ruby shell and help window together

    ->Programs ---> Ruby... ---> fxri [a bit slow to load, be patient]

    Ruby as a Scripting Language

  • runs in interpreter mode
  • commands are built-in C-functions, libraries
  • meant for short applications
  • no special editing tools required, text mode is sufficient.
  • generally terse (short and powerful scripts)
  • low fault tolerance
  • fast learning curve

    Some Buzz words

    in Ruby Object Oriented Programming

    Classes objects instances inheritance
    access module library method

    and in Applications

    RubyGems, SciTE, Watir, Rails, mySQL, Apache, Client-Server, irb fxri

    Go to ruby-page 4 ... Back to ruby-page 2 ... Starting page 1