Installing Programs with setup.rb

Quick Start

Type this (You might needs super user previledge):

($ su)
 # ruby setup.rb

If you want to install a program in to your home directory ($HOME), use following instead:

$ ruby setup.rb all --prefix=$HOME

Detailed Installtion Process

setup.rb invokes installation by three steps. There are "config", "setup" and "install". You can invoke each steps separately as following:

$ ruby setup.rb config
$ ruby setup.rb setup
# ruby setup.rb install

You can controll installation process by giving detailed options for each tasks. For example, --bin-dir=$HOME/bin let setup.rb install commands in $HOME/bin.

For details, see "Task Options".

Global Options

"Global Option" is a command line option which you can use for all tasks. You must give a global option before any task name.


suppress message outputs


output messages verbosely (default)


prints help and quit


prints version and quit


prints copyright and quit


These are acceptable tasks:


Invokes `config', `setup', then `install'. Task options for all is same with config.


Checks and saves configurations.


Prints current configurations.


Compiles ruby extentions.


Installs files.


Invokes tests.


Removes created files.


Removes all created files.

Task Options for CONFIG/ALL

You can pass following long options for CONFIG task and ALL task.

All options accept parameterized value, like --rbdir=$siterubyver or --sodir=$siterubyverarch. On UNIX shells, you should escape "$" character, so use --rbdir=\$siterubyver or --sodir=$siterubyverach.


A handy option to set common install target.

std: install files under $libruby.

site: install files under $siteruby.

home: install files under home directory ($HOME).


The path prefix of target directory pathes like $bindir, $libdir...


The directory for commands.


The directory for ruby scripts.


The directory for ruby extentions.


The directory for shared data.


The directory for configuration files.


The directory for manual pages.


The directory for ruby libraries.


The directory for standard ruby libraries.


The directory for standard ruby extensions.


The directory for version-independent non-standard ruby libraries


The directory for non-standard ruby libraries.


The directory for non-standard ruby extensions.


The path to set to #! line.


Shenbang line (#!) rewriting mode.

all: replace all shebang lines.

ruby: replace shebang lines which invokes ruby.

never: never rewrite shebang.


The ruby program using for installation.


The make program to compile ruby extentions.


Forces to setup.rb never to compile/install ruby extentions.


Your rbconfig.rb to load.

If there's the directory named "packages", You can also use these options:


Package names which you want to install.


Package names which you do not want to install.

[NOTE] You can pass options to extconf.rb like this:

ruby setup.rb config -- --with-tklib=/usr/lib/

Task Options for INSTALL


prints what to do and done nothing really.


The prefix of the installing directory path. This option may help binary package maintainers. A default value is an empty string.