O'Reilly logo

Ruby by Example by Kevin C. Baird

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Preparation and Installation

Before we get going with Ruby and CGI, we’ve got to do a little work to get our webserver ready. For the purposes of this chapter, I’ll be focusing on getting CGI working for the Apache webserver running on a Unix-like environment. Apache is the most popular webserver, and Unix-like operating systems are the most common (and most stable) server operating systems.

You can get a copy of the Apache webserver at http://httpd.apache.org, or you can use a package manager to install it. (Mac OS X comes with Apache pre-installed.) I used apt-get on my Ubuntu system, as follows:

apt-get install apache2 apache2-doc Reading package lists... Done Building dependency tree... Done The following extra packages will be installed: apache2-common ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required