--nextPart6198994.2GyO5GJGDS
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Tuesday 20 June 2006 08:48, Minkoo Seo wrote:

> Hi.
>
> I've installed Ubuntu Dapper in my desktop. To my disappoint it doesn't
> have ruby preinstalled. That's still okay, because I can do it by myself.
>
> I've apt-get install ruby. Then, I've apt-get install irb1.8 because I've
> installed
> ruby1.8. Surprisingly, irb command did not work. It turned out that I also
> have to apt-get install irb to run irb command.
>
> I can't figure out why things are working in this way. Does it make sense
> to apt-get twice just for irb? Or is this my own problem and not of ubuntu
> packages?
>
> If it's true that we have to apt-get install irb irb1.8 just for irb
> command,
> is there any way to fix such a non-intuitive installation procedure?
>
> Sincerely,
> Minkoo Seo

Actually, you got it completely wrong. Explanation and fix follows.

If you run 'apt-cache show irb' and 'apt-cache show irb1.8' you'll see Ubun=
tu=20
Dapper ships with two different Ruby versions: packages ruby, irb, ri, rdoc=
,=20
etc are Ruby 1.8.2 and packages ruby1.8, irb1.8, ri1.8, rdoc1.8, etc are Ru=
by=20
1.8.4. I guess the reason to ship two different versions is some dependency=
=20
problem, but I think that was a very wrong decision.

Therefore, you now have two different irb versions installed: 1.8.2 and 1.8=
=2E4=20
and I'm pretty sure you don't want that. I guess you want Ruby 1.8.4. What =
do=20
you do?=20
1. First of all, remove the 1.8.2 versions (irb, ri, ruby, rdoc, etc). You =
may=20
want to use dpkg --print-avail <packagename> to find out the version=20
information for an already-installed package. You may want to use=20
dpkg --get-selections to get a full list of packages installed on your=20
computer.

2. Install the 1.8.4 versions (ruby1.8, irb1.8, rdoc1.8, etc). Now you'll=20
have /usr/bin/ruby1.8, /usr/bin/irb1.8, etc

3. Use update-alternatives to install symlinks for easy access:

   # update-alternatives --install /usr/bin/irb irb /usr/bin/irb1.8 10
  =20
   This is a per-system (not per-user) setting. You might want to take a lo=
ok=20
at man update-alternatives to know the meaning of each option and how to=20
reconfigure it later.
=20
  You can just create symlinks instead of using update-alternatives, but=20
update-alternatives has some advantages (easy management, automanagement wh=
en=20
you install a package that provides the the "alternative", etc).

Debian Testing and Debian Sid have both Ruby 1.8.2 and Ruby 1.8.4, too.

Lastly, some people have said it's impossible to install rails in Ubuntu.=20
That's not true. There is a 'rails' package, it's up-to-date (1.1.2) and it=
's=20
in the 'universe' repository. You may need to edit your /etc/apt/sources.li=
st=20
file.

=2D-=20
Pau Garcia i Quiles
http://www.elpauer.org
(Due to the amount of work, I usually need 10 days to answer)

--nextPart6198994.2GyO5GJGDS
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQBEl9Fs/DzYv9iGJzsRAgRRAKDjO3DUp3gtPugfq9cOcGRplH7EsgCdFXb6
efriwdsPodPKbZjda777n2U=
=K0RV
-----END PGP SIGNATURE-----

--nextPart6198994.2GyO5GJGDS--