Stefano Crocco wrote:
> Alle Thursday 18 September 2008, Tom Cloyd ha scritto:
>   
>> I've a fresh compile of ruby 1.8.6
>>     
>
> This is the issue. The ruby you compiled is in a different location than the 
> one installed by the package manager. I don't use Kubntu, but I guess the one 
> installed using the package manager is in /usr, while the one you installed 
> manually is in /usr/local (that is the predefined path where the configure 
> script wants to install it, of course you can have changed it). When you 
> install rubygems using the package manager, the files are put somewhere in the 
> /usr/lib/ruby/ directory. The ruby you installed manually (which, I guess, 
> comes before the other in your PATH) expects to find its libraries in 
> /usr/local/lib/ruby, but rubygems hasn't been installed there.
>
> I can think of two ways you can take:
> 1) manually install rubygems using your custom install of ruby. This should be 
> quite easy to do. This is the easiest and cleanest option.
> 2) remove the ruby you installed manually, then reinstall it passing the --
> prefix=/usr option to configure. This will overwrite the version of ruby 
> installed by the package manager, but allow you to use gems and other ruby 
> libraries installed with it. This is a very messy solution, and you shouldn't 
> use it unless you have a reason not to use option 1.
>
> I hope this helps
>
> Stefano
>
>
>   
Arrrgh! THIS makes tons of sense.

I don't know much about this, but why don't these installs establish and 
reference symlinks. I.e., ruby gets installed and established a symlink 
which anything can access to find it, and likewise with rubygems. That 
would keep this sort of crap from happening. This mess is the result of 
someone who should know better not thinking things through. For compiled 
ruby to go one place and package manager ruby another??? This is a 
thoughtful solution to anything at all? The guy behind this surely has a 
career in investment banking waiting for him somewhere.

I compiled my ruby from source because I was having some problems with 
the package manager version. But then rubygems wouldn't install. Kept 
insisting that some libraries which WERE there were not. An expert I had 
look at the mess couldn't make sense of it. I then installed rubygems 
from the package manager. No problems. Except ruby cannot find the gems.

I will try try to use your idea to fix this mess when I have a little 
more time this evening.

Thanks so much for your thoughts.

Tom

-- 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tom Cloyd, MS MA, LMHC - Private practice Psychotherapist
Bellingham, Washington, U.S.A: (360) 920-1226
<< tc / tomcloyd.com >> (email)
<< TomCloyd.com >> (website) 
<< sleightmind.wordpress.com >> (mental health weblog)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~