Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having a problem installing webgen 0.5 in Ubuntu 12.04.

In particular, I have a website written in Markdown, and webgen 0.5 fails with:

Error while working on </index.en.html> with Webgen::ContentProcessor::Kramdown:
The needed library 'kramdown' is missing. You can install it via rubygems with 'gem  install kramdown'!

I try to install via:

-> sudo gem install kramdown
Successfully installed kramdown-0.13.7
1 gem installed
Installing ri documentation for kramdown-0.13.7...
Installing RDoc documentation for kramdown-0.13.7...

However, I still get the same error in webgen... (I tried installing in Ruby 1.8 gem, and Ruby 1.9 gem and I get the same error in both cases.)

share|improve this question
up vote 1 down vote accepted

I've figured it out. To answer my own question:

First off, one has to be careful to install Ruby 1.8 gems. First install Ruby 1.8 gems package:

sudo apt-get install rubygems1.8

Next, to install kramdown, make sure to install kramdown version 0.10.0 via:

sudo gem1.8 install kramdown -v 0.10.0

However, if you run webgen you will still get the error in the question. The solution is to force ruby to use ruby gems on the path. Before running webgen run:

export RUBYOPT=rubygems

If you did this but instead you installed the latest version of kramdown, then you get the following error (I paste it here so people can Google it):

Error while rendering </index.en.html>:
wrong number of arguments (1 for 2)

Once the correct version of kramdown is installed, running webgen on markdown source works:

Starting webgen...
Updating tree...
...done in 0.0138 seconds
Writing changed nodes...
...done in 0.0011 seconds

It looks like there is a quantal package for ruby-kramdown. So possibly, this workaround will not be necessary then.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.