From: Stefano Crocco Date: 2008-09-19T01:47:14+09:00 Subject: Re: cannot access gems 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