The Ruby Page
Ruby is a programming language which we will use in CIS 170. You can read more about the Ruby programming language by visiting the official site: http://www.ruby-lang.org/en/. Although we will talk about Ruby in lecture and in lab, you can read several useful tutorials here: http://www.ruby-lang.org/en/documentation/
It is critically important that you get Ruby installed and working for this course. If you have questions, please do not hesitate to email Victor (victorhs@cs.uoregon.edu)!
Install Ruby on your computer
You can download the Ruby software here: http://www.ruby-lang.org/en/downloads/
Windows Machines
If you use Windows, download the one-click installer. When asked by the installer, check the SciTE box - this will it give you a nice editor for your Ruby code.
Mac Machines (OS X)
If you're using OSX 10.4 (or higher), Ruby is already installed on your Mac. (Hooray!). Unfortunately, the SciTE editor is difficult to install on OSX and the editor is known to crash unexpectedly. We recommend using the TextEdit application (or some other text editor) to write your Ruby code, and then using the terminal to run your Ruby code. If this doesn't make sense, we'll explain more in lab.
Linux Machines
Depending on your Linux distribution, Ruby might already be installed. Follow the directions on the Ruby download page.
You can run Ruby from the web
You can also write and run Ruby code from an interactive web page:
http://tryruby.hobix.com/.
Unfortunately, it is difficult (or impossible) to copy and paste text into this window.
There is another interactive Ruby webpage here:
http://www.ruby.ch/interpreter/rubyinterpreter.shtml. Although this page is a little clumsy (it opens
several windows and has a pop-up), it's more powerful.
If you find other web-based Ruby environments, please let us know.
Test your Ruby environment
Here are some sample Ruby programs. Typically, Ruby program files have names ending with ".rb".