[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Debian notes for Ruby newbies (like me

EVman

8/13/2007 2:11:00 PM

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
2 Answers

Hans Fugal

8/13/2007 3:12:00 PM

0

EVman wrote:
> 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.

EVman

8/13/2007 4:26:00 PM

0


> 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