El Domingo 05 Abril 2009, Igor Pirnovar escribi=C3=B3:
What you are saying is very likely incorrect. You or someone else must
have screwed up the links to ruby and irb in {{ /usr/bin }}. If you do
the following you should get a similar result as I will list below:
$ cd /usr/bin/
$ ls -l ruby*
lrwxrwxrwx 1 root root 7 2009-02-27 13:52 ruby -> ruby1.8
-rwxr-xr-x 1 root root 3564 2008-10-09 20:19 ruby1.8
lrwxrwxrwx 1 root root 7 2008-10-28 12:51 ruby1.8-old-LINK ->
ruby1.8
-rwxr-xr-x 1 root root 3676 2008-01-24 07:02 ruby1.9
-rwxr-xr-x 1 root root 6320 2007-12-07 05:09
ruby-glade-create-template
$ ls -l irb*
lrwxrwxrwx 1 root root 6 2008-10-28 13:15 irb -> irb1.9
-rwxr-xr-x 1 root root 376 2008-10-09 20:14 irb1.8
-rwxr-xr-x 1 root root 376 2008-01-24 06:54 irb1.9
This is not what I clearly explained in my mail.
As I explained, I've Ruby1.8 and irb1.8 installed as DEB package, but I=20
installed Ruby1.9.1 from sources setting "--prefix=3D/usr/bin", getting:
/usr/bin$ ls -l ruby*
=2Drwxr-xr-x 1 root root 5,4M 2009-03-30 22:47 ruby*
=2Drwxr-xr-x 1 root root 6,1K 2009-01-25 03:04 ruby1.8*
lrwxrwxrwx 1 root root 4 2009-03-30 22:55 ruby1.9 -> ruby*
/usr/bin$ ls -l irb*
lrwxrwxrwx 1 root root 6 2009-03-28 14:16 irb -> irb1.8*
=2Drwxr-xr-x 1 root root 314 2009-03-30 22:48 irb1.8*
This is:
=2D /usr/bin/ruby1.8 is the executable of Ruby 1.8.
=2D /usr/bin/ruby is the executable of Ruby 1.9.1.
=2D /usr/bin/ruby1.9 is a softlink to /usr/bin/ruby.
As you see {{ ruby }} and {[ irb }} should be symbolic links to their
respective version binaries. To change the the behavior you can change
these links.
Not in my case as I've explained above.
For instance If I wish to make my {{ irb }} to point to {{ 1.8 irb }}, I
would do the following as {{ root }} or with the help of {{ sudo }}:
1) mv /usr/irb /usr/irb.old
2) ln -s /usr/bin/irb1.8 /usr/irb
If you are not sure you understand the above procedure I suggest you do
not do anything on your own without some more help from people on the
forum. For starters you should post the results of the following here:
Sorry, but I do *really* know what a symbolic link is. Please re-read my fi=
rst=20
mail before assuming I'm a starter.
However I found my problem.
irb1.9 exists after compiling Ruby1.9.1 in /usr/src/ruby1.9.1-xxx/bin/irb
In /usr/bin I had:
=2D /usr/bin/irb --> /usr/bin/irb1.8
=2D /usr/bin/irb1.8
So when I installed Ruby1.9.1, /usr/bin/irb was replaced by the Ruby1.9=20
version, this is, /usr/bin/irb1.8 pointed then to irb compiled in Ruby1.9.1.
I've solved it by copying the compiled irb (Ruby1.9) as /usr/bin/irb1.9 and=
=20
re-installing the Debian irb1.8 package, so /usr/bin/irb1.8 is replaced aga=
in.
Now:
~# irb1.8
irb(main):001:0> RUBY_VERSION
"1.8.7"
~# irb1.9
irb(main):001:0> RUBY_VERSION
"1.9.1"
=2D-=20
I=C3=B1aki Baz Castillo <
[email protected]>