From: jzakiya Date: 2007-04-30T02:35:10+09:00 Subject: Re: Accessing gems from /home dir On Apr 26, 12:55 pm, Dan Zwell wrote: > I would set the environment variable (in .bashrc) > > GEM_HOME= > > where is the directory with the folders: cache doc gems > specifications. I'm not positive it will work, but I do this on my > computer (for the opposite setup, with a central ruby install and gems > in my home dir), and it works fine. Note that rubygems has some bugs and > may not always pay attention to this environment variable when it should... > > Dan > > jzakiya wrote: > > I have Linux on a Toshiba Satellite laptop. > > > In my home dir I'm running Ruby 1.8.6. > > In my root dir I have Ruby 1.8.4 which was > > installed from my distro's (PCLinuxOS) repositories. > > > All my gems are loaded and run under root/1.8.4 control. > > I cannot access these gems from my home dir with 1.8.6. > > > What do I need to do to be able to access these gems > > from my home dir with 1.8.6? > > > Thanks > > > jz I set the GEM_HOME variable as you suggested, but no luck. Here's more detail into the nature of the problem. I can run both versions of ruby from my [home] as such: [home]$ /usr/bin/ruby -v ruby 1.8.4 (2005-12-24) [i586-linux-gnu] [home]$ ruby -v (or /usr/local/bin/ruby -v) ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux] No problem ro run gem as root: [root]# gem -v 0.9.2 But if I try to run gem from my [home], problems: [home]$ gem -v (or /usr/bin/gem -v) /usr/bin/gem:9:in `require': no such file to load -- rubygems (LoadError) from /usr/bin/gem:9 I put a symbolic link in my /usr/local/bin; ln -s /usr/bin/gem gem but that wouldn't let me run gem from [home] either. Is this a rubygems problem? Do I have to put a separate copy of rubygems in my [home] dir for it to work there? I also looked into the rubyconfig.rb file, but it didn't seem that needed any change. HELP! jz