Stefan Lang
8/4/2008 5:15:00 PM
2008/8/4 Frioffol Friofool <friofool@gmail.com>:
> Stefan Lang wrote:
>> 2008/8/4 Frioffol Friofool <friofool@gmail.com>:
>>> [root@compute test_projet_rails]# gem -v
>>>
>>> What's wrong with my configuration ?
>>
>> Maybe you have two Ruby installations. The one that is started by "ruby"
>> and "irb" doesn't have a gem installation. The one that the "gem"
>> command
>> uses, does.
>>
>> Compare the output of:
>>
>> $ cat `which gem` | head -n 1
>>
>> $ ls -l `which ruby`
>>
>> Stefan
>
> bingo !
> that was the problem...
>
> [root@compute test_projet_rails]# cat `which gem` | head -n 1
> #!/usr/bin/ruby
> [root@compute test_projet_rails]# ls -l `which ruby`
> -rwxr-xr-x 1 root root 1931641 ao=C3=BB 1 11:40 /usr/local/bin/ruby
>
> but how can i update the path and use just one ruby version ?
>
> i tried to install ruby sources first but for different reasons, i use
> the fedora installer 'yum'.
It seems that you have one ruby that was installed by your package
manager (the /usr/bin/ruby one) and one manual installation.
It is not a good idea to remove the one installed by the package
manager because other packages might depend on it.
You can remove the manual installation by deleting ruby, ri, rdoc,
erb and testrb from /usr/local/bin and deleting everything with
ruby in its name from /usr/local/lib.
OTOH, having two ruby installations is not a problem at all. Just
keep in mind that /usr/local comes first in your path. If you
want to use that, get & install the rubygems package from rubyforge.
That installs a gem command in /usr/local which again should shadow
the /usr/bin one.
Stefan