Content | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11

Official Ruby FAQ

If you wish to report errors or suggest improvements for this FAQ, please go to our GitHub repository and open an issue or pull request.

Installing Ruby

For current information on downloading and installing Ruby see the Installation or Downloads page.

What operating systems support Ruby?

This section or parts of it might be out-dated or in need of confirmation.

Ruby is developed under Linux, and is written in fairly straightforward C. It runs under Linux and other UNIX-like operating systems, macOS, Windows, DOS, BeOS, Amiga, Acorn Risc OS, and OS/2.

Where can I get Ruby sources?

The latest version of Ruby can be downloaded from: Mirror sites are also listed on this page.

Also on this page is a link to a nightly snapshot of the development tree.

Can I get to the development source tree?

This section or parts of it might be out-dated or in need of confirmation.

If you have a CVS client, you can check out the current source tree using:

$ cvs -d login
(Logging in to
CVS password: guest
$ cvs -d co ruby

If you do not have CVS you can get a nightly snapshot of the development source from

How do I compile Ruby?

Under Unix, Ruby uses the autoconf system to configure the build environment. You don’t need the autoconf command on your box to build Ruby from a distribution; just use the commands:

$ ./configure [configure options]
$ make
$ make test
$ make install

You may need superuser privileges to install Ruby if you don’t override the default installation location (/usr/local). You can get a full list of configure options using:

$ ./configure --help

If you are working from the source repository, you may need to run autoconf before running configure.

How do I tell Ruby where my libraries are?

This section or parts of it might be out-dated or in need of confirmation.

On some systems, the build process may fail to find libraries used by extension modules (for example the dbm libraries).

You can tell Ruby where to find libraries using options to configure. From [ruby-talk:5041]:

$ ./configure --with-xxx-yyy=DIR

where xxx is either

opt           extra software path in general
dbm           path for dbm library
gdbm          path for gdbm library
x11           ...for X11..
tk            ...for Tk...
tcl           ...for Tcl...

and yyy is either

dir           specifies -I DIR/include -L DIR/lib
include       specifies -I DIR
lib           specifies -L DIR

On HP-UX, there may be problems building with gcc. Try using the native compiler instead. WATANABE Tetsuya recommends:

$ CC="cc -Ae" CFLAGS=-O ./configure --prefix=/opt/gnu

There may also be problems with HP’s native sed. He recommends installing the GNU equivalent.

Are precompiled binaries available?

This section or parts of it might be out-dated or in need of confirmation.

A single download that contains everything you need to run Ruby under various Windows operating systems is available from RubyInstaller.

If you want other installation options, precompiled binaries for Windows are also available from If you download the ruby-1.x.y-yyyymmdd-i386-cygwin.tar.gz package (which is a good choice), you’ll also need to download the cygwin DLL, available from the same page.

Reuben Thomas writes:

You could mention that there’s a port to Acorn RISC OS, currently of v1.4.3. I made the port, and have no plans to maintain it, but I did send the patches to matz, so newer versions may well compile too.

I do provide a binary distribution of 1.4.3 for the Acorn at

What’s all this “cygwin”, “mingw”, and “djgpp” stuff?

This section or parts of it might be out-dated or in need of confirmation.

Ruby is written to take advantage of the rich feature set of a Unix environment. Unfortunately, Windows is missing some of the functions, and implements others differently. As a result, some kind of mapping layer is needed to run Ruby (and other Unix-based programs) under Windows.

You may come across different versions of the Ruby executable that use different wrapper mapping layers.

The rbdj version is a stand-alone version of the Windows binary of Ruby. It uses the DJ Delorie tools (

The rbcw version is a Windows binary of Ruby that requires the cygwin library, available at or from the Ruby download pages. Cygwin is both an emulation layer and a set of utilities initially produced by Cygnus Solutions (now part of Redhat). The cygwin version of Ruby probably has the fullest set of features under Windows, so most programmers will want to use it.

To use the rbcw version, you will need to install the cygwin .dll separately. Once you have installed cygwin on your computer, copy cygwin1.dll (which is found in the bin subdirectory of the cygwin distribution) to your Windows\System32 folder (or somewhere else on your path).

Thanks to Anders Schneiderman for the basis of this description.

Why doesn’t Tk graphics work under Windows?

This section or parts of it might be out-dated or in need of confirmation.

Is Tk installed correctly on your Windows box? Go to to find a precompiled binary Tcl/Tk distribution for your box.

Are the environment variables TCL_LIBRARY and TK_LIBRARY pointing to the directories containing tcl and tk?

Is the tk library in your path?