Problem with rubygems-1.3.5 on Ubuntu

I know that the Ruby language and associated tools are created for free by enthusiasts, but quite often there are little issues that spoil the experience. Like this one;
I needed to install Rails on Ubuntu 8.04.3. After installing ruby gems 1.3.5 I did this;

$ gem install rails
$ /usr/bin/gem:11: undefined [...]