Webgen is a nice Ruby utility to generate a website starting from source files written in different markup languages.

The current development version (0.5.x) is not yet packaged for most GNU/Linux distros, so here you are some instructions to install it on a Debian Etch system.

Webgen 0.5.6 on Debian Etch


Installing webgen 0.5.6 following the instructions below will render any webgen 0.4.x Debian package unusable, at least in my experience.

So far, I've not been able to have both webgen 0.5.6 and webgen 0.4.x running on the same system.

After the installation procedure described below, if I try to run the /usr/bin/webgen executable (Debian Lenny package, otherwise running fine on Debian Etch), I get the error:

        `require': no such file to load -- cmdparse (LoadError)

Adding export RUBYOPT=rubygems to ~/.bashrc doesn't resolve; I get another kind of error:

  /usr/bin/webgen:4: undefined method `cli_main' for Webgen:Module (NoMethodError)

So, please don't proceed if you need to keep a working webgen 0.4.x version on your system.

1. Install basic Ruby packages

There are no webgen backports for Debian Etch, so we have to install it from the Ruby sources; anyway, some basic Ruby packages can be installed as standard Debian packages.

aptitude install ruby1.8 libredcloth-ruby rubygems

(maybe something more)

Note: if you are on a Sun sparc platform, the current ruby packages are bugged: use the etch-backports packages instead: see

2. Install webgen dependencies

Dependencies are listed at

3. Install webgen

There are two package types at, .gem packages and .tgz packages.

I tried installing the .gem package, but ran into dependency problems, so I downloaded the tgz package and compiled it.

Before proceeding, we need to install the rake utility

gem install --local rake-0.8.3

To compile and install webgen:

  cd sources
  ruby setup.rb config --prefix /usr/local
  ruby setup.rb setup
  ruby setup.rb install

4. Test the sample site creation



webgen create sample_site

If you get this kind of error...

  `require': no such file to load -- cmdparse (LoadError) have to put this in ~/.bashrc

  export RUBYOPT=rubygems

TechDocs/FellowshipHacks/Webgen (last edited 2016-03-21 17:51:02 by paul)