CSE 341 Lecture Notes - Running Ruby

Ruby itself is designed to load and run files, but doesn't have an interface for interactive use. For interactive use, use 'irb' (Linux and Macintosh) or 'fxri' (Windows). You can start up interactive Ruby, and type expressions to be evaluated. Use the load function to load in a program file. Type control-d to exit.

CSE Lab Machines - Windows

'fxri' lives under Programs > DEV TOOLS&LANGUAGES > Ruby-186-26 > fxri. This includes an integrated documentation browser. There is also other documentation under Ruby-186-26.

CSE Lab Machines - Linux

Type 'irb' at the prompt to get Interactive Ruby. Type 'ruby yourfilename.rb' to run Ruby on a program file.

Personal Machines

You may already have Ruby on your machine -- for example, it comes bundled with Leopard on the Macintosh. Otherwise you can download Ruby for various platforms from the Ruby home page. It's free.