Debian notes for Ruby newbies (like me)

E

EVman

This is probably a known issue by regulars, but I will post it for Ruby
newbies using Debian. I have tested the following several times on a
fresh new install of Debian Etch just to make sure that the problem wasn't
particular to my two year old Sarge.

The apt install process is really hoked up with the Ruby stuff. Ruby and
Gems installs ok but don't run immediately. Ruby itself installs as
ruby1.8 but the paths are set to call just ruby. Either simlink to the
proper name or change the name of the executable or shebang it.

Also the executable is installed in /usr/bin but the paths are set to
/usr/local/bin. Again you either have to move it or simlink it or add to
the path.

Gems installs ok but gives an "in `require': no such file to load". This
is because the package maintainers forgot to include zlibc in the package.
Strange because Debian packages seldom have this kind of error. Apt-get
it and gems should start working.

For some reason, libtk-ruby may or may not be included by something that I
haven't tracked down yet. Sometimes it is already there even though I
didn't install anything related to TK. But if you want to run Ruby-TK,
just manually apt-get it.

I assume that the above will affect both Sarge and Etch, and the various
flavors of Debian like Knoppix and Ubuntu.

EVMan
 
H

Hans Fugal

EVman said:
This is probably a known issue by regulars, but I will post it for Ruby
newbies using Debian. I have tested the following several times on a
fresh new install of Debian Etch just to make sure that the problem wasn't
particular to my two year old Sarge.

The apt install process is really hoked up with the Ruby stuff. Ruby and
Gems installs ok but don't run immediately. Ruby itself installs as
ruby1.8 but the paths are set to call just ruby. Either simlink to the
proper name or change the name of the executable or shebang it.

This is so that you can run multiple versions. You need the ruby
metapackage which sets up the symlink for you (and can be changed with
the debian alternatives system).

$ dpkg -S `which ruby`
ruby: /usr/bin/ruby
Also the executable is installed in /usr/bin but the paths are set to
/usr/local/bin. Again you either have to move it or simlink it or add to
the path.

I haven't run into this (I have /usr/local/bin in my path so I wouldn't
notice), but if it's true it's certainly a bug in the package. If you
haven't already done so please submit it via the debian bugtracking system.
Gems installs ok but gives an "in `require': no such file to load". This
is because the package maintainers forgot to include zlibc in the package.
Strange because Debian packages seldom have this kind of error. Apt-get
it and gems should start working.

Again, please submit to the debian package maintainers. But frankly, I
find mixing gems and debs to be highly unwise at best. I recommend
sticking with one or the other, and my own choice is to use gems and
manual installs for ruby, as I do with other things where I live on the
cutting edge. I install ruby from apt, but everything else I do "the
ruby way".
For some reason, libtk-ruby may or may not be included by something that I
haven't tracked down yet. Sometimes it is already there even though I
didn't install anything related to TK. But if you want to run Ruby-TK,
just manually apt-get it.

Here's a horror story - in the old days the entire ruby standard lib was
split up into dozens of packages. Makes me shudder just remembering it.
 
E

EVman

Again, please submit to the debian package maintainers. But frankly, I
find mixing gems and debs to be highly unwise at best. I recommend
sticking with one or the other, and my own choice is to use gems and

Yep. I am putting together a submission to the package folks, but I want
to validate my findings first - really well. Since I have replicated the
errors on three different machines I am pretty sure of the bug(s), but I
will have a friend try to poke holes in my theories tonight.

What bothers me is that I can get the same errors on a Sarge being fed
from a local mirror that is almost 8 months old. So why am I the first
one to catch the so-called errors in all that time? That is the item that
keeps making me think that I am screwing up somewhere.

EVMan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top