El Domingo 05 Abril 2009, Igor P. escribió:
-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
installed Ruby1.9.1 from sources setting “–prefix=/usr/bin”, getting:
/usr/bin$ ls -l ruby*
-rwxr-xr-x 1 root root 5,4M 2009-03-30 22:47 ruby*
-rwxr-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*
-rwxr-xr-x 1 root root 314 2009-03-30 22:48 irb1.8*
This is:
- /usr/bin/ruby1.8 is the executable of Ruby 1.8.
- /usr/bin/ruby is the executable of Ruby 1.9.1.
- /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 }}:
- mv /usr/irb /usr/irb.old
- 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
first
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:
- /usr/bin/irb --> /usr/bin/irb1.8
- /usr/bin/irb1.8
So when I installed Ruby1.9.1, /usr/bin/irb was replaced by the Ruby1.9
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
re-installing the Debian irb1.8 package, so /usr/bin/irb1.8 is replaced
again.
Now:
~# irb1.8
irb(main):001:0> RUBY_VERSION
“1.8.7”
~# irb1.9
irb(main):001:0> RUBY_VERSION
“1.9.1”