# Ruby under Suse Linux

**URL:** <https://rubytalk.org/t/ruby-under-suse-linux/11289>\
**Category:** ruby-talk\
**Created:** [29 April 2004 14:10 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289 "2004-04-29T14:10:08Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Calder](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Mike\_Calder](https://rubytalk.org/u/Mike_Calder)\
**Post date:** [29 April 2004 14:10 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/1 "2004-04-29T14:10:08Z")

</div>

Hi.

I’m new to Ruby, and struggling; Ruby does not seem to be very easy to install  
under Linux.

I can’t use the Suse RPM package, as I want the functionality of FOX and  
fxruby, and they aren’t on the distro. So I installed Ruby, FOX, and fxruby  
from the source tars. After several problems with the install process  
(libraries didn’t seem to go where Ruby assumes them to be), by adding links  
and setting environment variables I have managed to get these working; I can  
run trivial programs, and I get the GUI results expected.

The problems just start afresh when I try to add extension libraries, or even  
run programs that need libraries that I think I have already installed.

For example, there are a couple of sample programs that require soap and html  
parser functionality - I thought soap was part of the core, but I installed  
it again in any case, and also installed the html parser stuff. The installs  
run clean but the programs still give load errors.

I suspect the problem is where the library modules and files are expected to  
be - I just can’t sort it out; I’ve copied everything several times over in  
every place I think they should be; I have multiple copies all the same  
in …/ruby/1.8, …/ruby/site-ruby/1.8, in my home directory …/ruby/1.8  
and …/ruby/site-ruby/1.8.

I’ve looked through various websites and documentation, and though there seems  
a lot of it, it’s not very well organised and after three days struggling I  
can’t find what I’m looking for; my questions are:

Where does ruby expect library and extension files to be? What are the rules?  
Is there a single document that tells me how to sort this mess out?

Can anyone point me? Ruby seems to be so close to what I want but if it’s  
going to be like this all the time

> **···**
>
> –  
> Clear skies!  
> Mike Calder.

---

<div class="post-metadata">

**Author:** ![ts1](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@ts1](https://rubytalk.org/u/ts1)\
**Post date:** [29 April 2004 14:19 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/2 "2004-04-29T14:19:41Z")

</div>

> I suspect the problem is where the library modules and files are expected to  
> be - I just can't sort it out; I've copied everything several times over in  
> every place I think they should be; I have multiple copies all the same  
> in ../ruby/1.8, ../ruby/site-ruby/1.8, in my home directory ../ruby/1.8  
> and ../ruby/site-ruby/1.8.

Well, the problem is that you must \*not\* manually copy the files.

First before installing a module, verify if it's not distributed with your  
version of ruby. It's useless to have multiple versions of the same  
extensions

Then read the file README.en (or ...) which come with the extension.

Generally there are 2 ways to install an extension

&nbsp;&nbsp;&nbsp;&nbsp;$ ruby extconf.rb  
&nbsp;&nbsp;&nbsp;&nbsp;$ make  
&nbsp;&nbsp;&nbsp;($ su)  
&nbsp;&nbsp;&nbsp;&nbsp;# make install

&nbsp;&nbsp;&nbsp;or

&nbsp;&nbsp;&nbsp;&nbsp;$ ruby install.rb config  
&nbsp;&nbsp;&nbsp;&nbsp;$ ruby install.rb setup  
&nbsp;&nbsp;&nbsp;($ su)  
&nbsp;&nbsp;&nbsp;&nbsp;# ruby install.rb install  
&nbsp;&nbsp;&nbsp;&nbsp;  
Guy Decoux

---

<div class="post-metadata">

**Author:** ![Yuri\_Leikind](https://avatars.discourse-cdn.com/v4/letter/y/85f322/32.png) [@Yuri\_Leikind](https://rubytalk.org/u/Yuri_Leikind)\
**Post date:** [29 April 2004 14:26 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/3 "2004-04-29T14:26:19Z")

</div>

Just a hint : You didn’t need to install Ruby from sources as you have a SuSE package.  
To compile some extension with this Ruby package you just need to install Ruby  
development package, it has suffixes ‘dev’ or ‘devel’ (depends on the distro) in  
its name.

> **···**
>
> On Thu, 29 Apr 2004 23:10:08 +0900 Mike Calder [ceo@phosco.com](mailto:ceo@phosco.com) wrote:
> 
> > ```
> > Hi.
> >  
> > I'm new to Ruby, and struggling; Ruby does not seem to be very easy to install 
> > under Linux.
> >  
> > I can't use the Suse RPM package, as I want the functionality of FOX and 
> > fxruby, and they aren't on the distro. So I installed Ruby, FOX, and fxruby 
> > from the source tars. 
> > 
> > ```
> 
> –  
> Best regards,  
> Yuri Leikind

---

<div class="post-metadata">

**Author:** ![Ara.T.Howard](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Ara.T.Howard](https://rubytalk.org/u/Ara.T.Howard)\
**Post date:** [5 May 2004 23:23 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/4 "2004-05-05T23:23:57Z")

</div>

> Hi.
> 
> I’m new to Ruby, and struggling; Ruby does not seem to be very easy to  
> install under Linux.

it should be - should be an easy fix.

> I can’t use the Suse RPM package, as I want the functionality of FOX and  
> fxruby, and they aren’t on the distro. So I installed Ruby, FOX, and fxruby  
> from the source tars. After several problems with the install process  
> (libraries didn’t seem to go where Ruby assumes them to be), by adding links  
> and setting environment variables I have managed to get these working; I can  
> run trivial programs, and I get the GUI results expected.

you have two good choices

a) install ruby where your system looks for stuff

b) configure your system to look where ruby puts stuff

you should not need links or environment vars in either case. do a man  
‘ld.so’ to grok what i’m talking about, but you might try this:

1. export LD\_RUN\_PATH=/usr/local/lib/

2. install fox, fxruby, and ruby in this location, for example:

(note that /usr/local is **probably** the default for each of these)

this is assuming each of those packages installs with the standard  
configure/make/make install business…

this would setup all the bins/libs for these packages to KNOW themselves where  
to look for things - as having LD\_RUN\_PATH set at **complie** time encodes it  
in the binaries. this obviates the need to use envs or links.

> The problems just start afresh when I try to add extension libraries, or  
> even run programs that need libraries that I think I have already installed.
> 
> For example, there are a couple of sample programs that require soap and  
> html parser functionality - I thought soap was part of the core, but I  
> installed it again in any case, and also installed the html parser stuff.  
> The installs run clean but the programs still give load errors.

run this

~ \> which ruby  
~ \> which -a ruby

you probably have the following situation

- /usr/bin/ruby (1.6.8)
- /usr/local/bin/rbuy (1.8.1)

each of them looks for libs in a different place (based on version), you have  
probably installed things with one ruby, but are running with another.

export PATH=/usr/local/bin:$PATH

and try again

in general, if you are having load errors do this

ruby -e ‘p $LOAD\_PATH’

this tells you where ruby looks for things - then check if they are there. if  
they aren’t then they have not been installed correctly or you are using a  
different ruby which looks different places

> I suspect the problem is where the library modules and files are expected to  
> be - I just can’t sort it out; I’ve copied everything several times over in  
> every place I think they should be; I have multiple copies all the same in  
> ../ruby/1.8, ../ruby/site-ruby/1.8, in my home directory ../ruby/1.8  
> and ../ruby/site-ruby/1.8.

but if you are running /usr/bin/ruby and it’s 1.6.8 it won’t look any of those  
places…

> I’ve looked through various websites and documentation, and though there  
> seems a lot of it, it’s not very well organised and after three days  
> struggling I can’t find what I’m looking for; my questions are:
> 
> Where does ruby expect library and extension files to be? What are the  
> rules? Is there a single document that tells me how to sort this mess out?
> 
> Can anyone point me? Ruby seems to be so close to what I want but if it’s  
> going to be like this all the time

stick with it. this really doen’t have anything to do with ruby and every  
thing to do with unix - understand the concepts of PATH, LD\_RUN\_PATH, and  
LD\_LIBRARY\_PATH and you will be set for more that just ruby. if you have more  
problems post some more.

welcome to the club.

-a

> **···**
>
> ## On Thu, 29 Apr 2004, Mike Calder wrote:
> 
> ===============================================================================
> 
> > EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov  
> > PHONE :: 303.497.6469  
> > ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328  
> > URL :: [Solar-Terrestrial Physics Data | NCEI](http://www.ngdc.noaa.gov/stp/)  
> > TRY :: for l in ruby perl;do $l -e “print "\x3a\x2d\x29\x0a"”;done  
> > ===============================================================================

---

<div class="post-metadata">

**Author:** ![Mike\_Z](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Mike\_Z](https://rubytalk.org/u/Mike_Z)\
**Post date:** [29 April 2004 14:44 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/5 "2004-04-29T14:44:15Z")

</div>

Generally that’s true, but with SuSE the ruby package contains everything  
you need to compile against it (they have -devel packages for other  
software, though).

I’ve built my own ruby 1.8.1 rpms (as well as ruby-gnome), but I’m not a  
fox user (to state it mildly), so there’s not much more help I can offer.

Except to say that it is possible, and you’ll probably learn a lot getting  
it to work, so good luck. 🙂

Cheers,  
Mike

> **···**
>
> On Thu, 29 Apr 2004, Yuri Leikind wrote:
> 
> > On Thu, 29 Apr 2004 23:10:08 +0900 \> Mike Calder [ceo@phosco.com](mailto:ceo@phosco.com) wrote:
> > 
> > > ```
> > > Hi.
> > >  
> > > I'm new to Ruby, and struggling; Ruby does not seem to be very easy to install 
> > > under Linux.
> > >  
> > > I can't use the Suse RPM package, as I want the functionality of FOX and 
> > > fxruby, and they aren't on the distro. So I installed Ruby, FOX, and fxruby 
> > > from the source tars. 
> > > 
> > > ```
> > 
> > Just a hint : You didn’t need to install Ruby from sources as you have a SuSE package.  
> > To compile some extension with this Ruby package you just need to install Ruby  
> > development package, it has suffixes ‘dev’ or ‘devel’ (depends on the distro) in  
> > its name.
> 
> –  
> Mike Z [zofa@wyer.org](mailto:zofa@wyer.org) - it’s an apathy thing

---

<div class="post-metadata">

**Author:** ![Mike\_Calder](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Mike\_Calder](https://rubytalk.org/u/Mike_Calder)\
**Post date:** [29 April 2004 14:48 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/6 "2004-04-29T14:48:42Z")

</div>

I do read README and INSTALL files. I did the original installs in the  
correct manner - ruby install.rb or config, make, make install, depending.

Once libraries are created though, and they are not where the executable  
expects them to be, it’s usually enough to copy them about; that’s what I’ve  
done.

I still need to know where Ruby expects these things to be, or how to specify  
(preferably in a single place, once and for all) where it should look.

> **···**
>
> On Thursday 29 April 2004 15:19, ts wrote:
> 
> > > I suspect the problem is where the library modules and files are  
> > > expected to M\> be - I just can’t sort it out; I’ve copied everything  
> > > several times over in M\> every place I think they should be; I have  
> > > multiple copies all the same M\> in …/ruby/1.8, …/ruby/site-ruby/1.8, in  
> > > my home directory …/ruby/1.8 M\> and …/ruby/site-ruby/1.8.
> > 
> > Well, the problem is that you must _not_ manually copy the files.
> > 
> > First before installing a module, verify if it’s not distributed with your  
> > version of ruby. It’s useless to have multiple versions of the same  
> > extensions
> > 
> > Then read the file README.en (or …) which come with the extension.
> > 
> > Generally there are 2 ways to install an extension
> > 
> > ```
> > $ ruby extconf.rb
> > $ make
> > 
> > ```
> > 
> > ($ su)  
> > # make install
> > 
> > or
> > 
> > ```
> > $ ruby install.rb config
> > $ ruby install.rb setup
> > 
> > ```
> > 
> > ($ su)  
> > # ruby install.rb install
> > 
> > Guy Decoux
> 
> –  
> Clear skies!  
> Mike Calder.

---

<div class="post-metadata">

**Author:** ![Claus\_Spitzer](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@Claus\_Spitzer](https://rubytalk.org/u/Claus_Spitzer)\
**Post date:** [6 May 2004 00:42 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/7 "2004-05-06T00:42:13Z")

</div>

8\< snip

> > I can’t use the Suse RPM package, as I want the functionality of FOX and  
> > fxruby, and they aren’t on the distro. So I installed Ruby, FOX, and fxruby  
> > from the source tars. After several problems with the install process  
> > (libraries didn’t seem to go where Ruby assumes them to be), by adding links  
> > and setting environment variables I have managed to get these working; I can  
> > run trivial programs, and I get the GUI results expected.

8\< really big snip

This may end up going off a tangent, but perhaps one solution could be  
to install apt-get (afaik there is a RedHat installer for it, should  
work for Suse as well), and then get all the packages via that tool…

---

<div class="post-metadata">

**Author:** ![ts1](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@ts1](https://rubytalk.org/u/ts1)\
**Post date:** [29 April 2004 14:57 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/8 "2004-04-29T14:57:59Z")

</div>

> I still need to know where Ruby expects these things to be, or how to specify  
> (preferably in a single place, once and for all) where it should look.

Well, I don't understand : if you follow the instructions in the README  
file, you'll not have a problem and ruby will automatically find it.

The only possibility that I see, is that you use one version of ruby to  
make the installation and then try to use these extensions with another  
version of ruby

Try to do

&nbsp;&nbsp;&nbsp;ruby -e 'p $LOAD\_PATH'

and you'll see where ruby look to find the libraries

Guy Decoux

---

<div class="post-metadata">

**Author:** ![Mike\_Calder](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Mike\_Calder](https://rubytalk.org/u/Mike_Calder)\
**Post date:** [29 April 2004 15:55 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/9 "2004-04-29T15:55:55Z")

</div>

That’s the information I wanted, thanks. At least the reason for failure has  
now apparently changed.

ruby -e ‘p $LOAD\_PATH’

gives me:

[“/usr/local/lib/ruby/site\_ruby/1.8”, “/usr/local/lib/ruby/site\_ruby/1.8/  
i686-linux”, “/usr/local/lib/ruby/site\_ruby”, “/usr/local/lib/ruby/1.8”, “/  
usr/local/lib/ruby/1.8/i686-linux”, “.”]

I have made sure that the files and extensions I’m using are in one or more of  
these (actually, everything is just about everywhere). Presumably the search  
sequence is as listed, and there really only needs to be one copy of  
something in one of those? Or is there a distinction between them? I notice  
that the i686-linux directories have binary libraries where the others have  
ruby source, in general - is this a required split or just for convenience of  
tracking?

I have

require ‘html-parser’

and

class MyHTMLParser \< HTMLParser

in a ruby script. I have made sure that html-parser.rb (a standard ruby  
extension I downloaded and installed using ruby install.rb) is present (along  
with the sgml-parser.rb it requires) in

usr/local/lib/ruby  
usr/local/lib/ruby/1.8  
usr/local/lib/ruby/site\_ruby  
usr/local/lib/ruby/site\_ruby/1.8

Each copy is identical and contains the definition of ‘HTMLParser’.

However, when I run my script I get

testhtml.rb:22: undefined superclass `HTMLParser’ (TypeError)

The ‘html-parser’ is presumably now being found as I am no longer getting  
LoadError messages, but the content (the definition of class ‘HTMLParser’)  
is not being used by my code (actually cut and pasted from a standard  
example).

So probably the problem has changed from me not having things in the right  
place to not understanding how to use standard classes.

I’ll give it another day.

> **···**
>
> On Thursday 29 April 2004 15:57, ts wrote:
> 
> > > I still need to know where Ruby expects these things to be, or how to  
> > > specify M\> (preferably in a single place, once and for all) where it should  
> > > look.
> > 
> > Well, I don’t understand : if you follow the instructions in the README  
> > file, you’ll not have a problem and ruby will automatically find it.
> > 
> > The only possibility that I see, is that you use one version of ruby to  
> > make the installation and then try to use these extensions with another  
> > version of ruby
> > 
> > Try to do
> > 
> > ruby -e ‘p $LOAD\_PATH’
> > 
> > and you’ll see where ruby look to find the libraries
> > 
> > Guy Decoux
> 
> –  
> Clear skies!  
> Mike Calder.

---

<div class="post-metadata">

**Author:** ![Mike\_Z](https://avatars.discourse-cdn.com/v4/letter/m/9d8465/32.png) [@Mike\_Z](https://rubytalk.org/u/Mike_Z)\
**Post date:** [29 April 2004 16:03 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/10 "2004-04-29T16:03:14Z")

</div>

Mike,

What #! line are you using in your script?

It sounds like all your ruby stuff has been installed in /usr/local/, but  
your script is running the suse-supplied binary in /usr/bin.

Cheers,  
Mike

> **···**
>
> On Fri, 30 Apr 2004, Mike Calder wrote:
> 
> > That’s the information I wanted, thanks. At least the reason for failure has  
> > now apparently changed.
> > 
> > ruby -e ‘p $LOAD\_PATH’
> > 
> > gives me:
> > 
> > [“/usr/local/lib/ruby/site\_ruby/1.8”, “/usr/local/lib/ruby/site\_ruby/1.8/  
> > i686-linux”, “/usr/local/lib/ruby/site\_ruby”, “/usr/local/lib/ruby/1.8”, “/  
> > usr/local/lib/ruby/1.8/i686-linux”, “.”]
> > 
> > I have made sure that the files and extensions I’m using are in one or more of  
> > these (actually, everything is just about everywhere). Presumably the search  
> > sequence is as listed, and there really only needs to be one copy of  
> > something in one of those? Or is there a distinction between them? I notice  
> > that the i686-linux directories have binary libraries where the others have  
> > ruby source, in general - is this a required split or just for convenience of  
> > tracking?
> > 
> > I have
> > 
> > require ‘html-parser’
> > 
> > and
> > 
> > class MyHTMLParser \< HTMLParser
> > 
> > in a ruby script. I have made sure that html-parser.rb (a standard ruby  
> > extension I downloaded and installed using ruby install.rb) is present (along  
> > with the sgml-parser.rb it requires) in
> > 
> > usr/local/lib/ruby  
> > usr/local/lib/ruby/1.8  
> > usr/local/lib/ruby/site\_ruby  
> > usr/local/lib/ruby/site\_ruby/1.8
> > 
> > Each copy is identical and contains the definition of ‘HTMLParser’.
> > 
> > However, when I run my script I get
> > 
> > testhtml.rb:22: undefined superclass `HTMLParser’ (TypeError)
> > 
> > The ‘html-parser’ is presumably now being found as I am no longer getting  
> > LoadError messages, but the content (the definition of class ‘HTMLParser’)  
> > is not being used by my code (actually cut and pasted from a standard  
> > example).
> > 
> > So probably the problem has changed from me not having things in the right  
> > place to not understanding how to use standard classes.
> > 
> > I’ll give it another day.
> > 
> > On Thursday 29 April 2004 15:57, ts wrote:
> 
> > > > I still need to know where Ruby expects these things to be, or how to  
> > > > specify M\> (preferably in a single place, once and for all) where it should  
> > > > look.
> > > 
> > > Well, I don’t understand : if you follow the instructions in the README  
> > > file, you’ll not have a problem and ruby will automatically find it.
> > > 
> > > The only possibility that I see, is that you use one version of ruby to  
> > > make the installation and then try to use these extensions with another  
> > > version of ruby
> > > 
> > > Try to do
> > > 
> > > ruby -e ‘p $LOAD\_PATH’
> > > 
> > > and you’ll see where ruby look to find the libraries
> > > 
> > > Guy Decoux
> 
> –  
> Mike Z [zofa@wyer.org](mailto:zofa@wyer.org) - it’s an apathy thing

---

<div class="post-metadata">

**Author:** ![ts1](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@ts1](https://rubytalk.org/u/ts1)\
**Post date:** [29 April 2004 16:05 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/11 "2004-04-29T16:05:52Z")

</div>

> So probably the problem has changed from me not having things in the right  
> place to not understanding how to use standard classes.

Well, here what I've done with this version of ruby

svg% ruby -ve 'p $LOAD\_PATH'  
ruby 1.8.1 (2004-04-24) [i686-linux]  
["/home/ts/local/r181/lib/ruby/site\_ruby/1.8", "/home/ts/local/r181/lib/ruby/site\_ruby/1.8/i686-linux", "/home/ts/local/r181/lib/ruby/site\_ruby", "/home/ts/local/r181/lib/ruby/1.8", "/home/ts/local/r181/lib/ruby/1.8/i686-linux", "."]  
svg%

svg% ruby install.rb  
./formatter.rb -\> /home/ts/local/r181/lib/ruby/site\_ruby/formatter.rb  
./html-parser.rb -\> /home/ts/local/r181/lib/ruby/site\_ruby/html-parser.rb  
./sgml-parser.rb -\> /home/ts/local/r181/lib/ruby/site\_ruby/sgml-parser.rb  
svg%

svg% ruby -rhtml-parser -e 'class MyHTMLParser \< HTMLParser; end; p MyHTMLParser'  
MyHTMLParser  
svg%

Guy Decoux

---

<div class="post-metadata">

**Author:** ![Mike\_Calder](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Mike\_Calder](https://rubytalk.org/u/Mike_Calder)\
**Post date:** [29 April 2004 16:52 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/12 "2004-04-29T16:52:01Z")

</div>

Now I’m really confused. I thought, “what’s a standard-ish sort of core class  
that should work?” Looked in the first directory of the load path and found  
Matrix - I assume that’s part of core 1.8? That fails as well. String is  
OK, but that’s built-in.

So, my problem is that no classes other than built-in classes are working.  
Hm.

> ruby -ve ‘p $LOAD\_PATH’  
> ruby 1.8.1 (2003-12-25) [i686-linux]  
> [“/usr/local/lib/ruby/site\_ruby/1.8”, “/usr/local/lib/ruby/site\_ruby/1.8/  
> i686-linux”, “/usr/local/lib/ruby/site\_ruby”, “/usr/local/lib/ruby/1.8”, “/  
> usr/local/lib/ruby/1.8/i686-linux”, “.”]

> ruby -rhtml-parser -e ‘class MyHTMLParser \< HTMLParser; end; p  
> MyHTMLParser’  
> -e:1: undefined superclass `HTMLParser’ (TypeError)

> ruby -rhtml-parser -e ‘class MyHTMLParser \< Matrix; end; p MyHTMLParser’  
> -e:1: undefined superclass `Matrix’ (TypeError)

> ruby -rhtml-parser -e ‘class MyHTMLParser \< String; end; p MyHTMLParser’  
> MyHTMLParser

> > So probably the problem has changed from me not having things in the  
> > right M\> place to not understanding how to use standard classes.
> 
> Well, here what I’ve done with this version of ruby

…

> **···**
>
> On Thursday 29 April 2004 17:05, ts wrote:
> 
> > svg% ruby -rhtml-parser -e ‘class MyHTMLParser \< HTMLParser; end; p  
> > MyHTMLParser’ MyHTMLParser  
> > svg%
> > 
> > Guy Decoux
> 
> –  
> Clear skies!  
> Mike Calder.

---

<div class="post-metadata">

**Author:** ![ts1](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@ts1](https://rubytalk.org/u/ts1)\
**Post date:** [29 April 2004 16:56 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/13 "2004-04-29T16:56:30Z")

</div>

> ruby -rhtml-parser -e 'class MyHTMLParser \< Matrix; end; p MyHTMLParser'  
> -e:1: undefined superclass `Matrix' (TypeError)

Well, for this you need to require matrix.rb

svg% ruby -rmatrix -e 'class A \< Matrix; end; p A'  
A  
svg%

Guy Decoux

---

<div class="post-metadata">

**Author:** ![Mike\_Calder](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@Mike\_Calder](https://rubytalk.org/u/Mike_Calder)\
**Post date:** [29 April 2004 17:53 UTC](https://rubytalk.org/t/ruby-under-suse-linux/11289/14 "2004-04-29T17:53:15Z")

</div>

Don’t you hate it when you make stupid mistakes like that?

OK, when I did it properly, matrix worked fine, html-parser didn’t.

Cutting a long story short, after trying a lot of things, I realised that I  
had, as always, missed something simple.

I installed as root, and for some reason the install had set the properties of  
the .rb files in html-parser to rwx for root, and nothing for anyone else.  
Just adding the read properties fixed things.

> **···**
>
> On Thursday 29 April 2004 17:56, ts wrote:
> 
> > > ruby -rhtml-parser -e ‘class MyHTMLParser \< Matrix; end; p  
> > > MyHTMLParser’ M\> -e:1: undefined superclass `Matrix’ (TypeError)
> > 
> > Well, for this you need to require matrix.rb
> > 
> > svg% ruby -rmatrix -e ‘class A \< Matrix; end; p A’  
> > A  
> > svg%
> > 
> > Guy Decoux
> 
> –  
> Clear skies!  
> Mike Calder.
