From: Ryan Davis Date: 2010-09-03T10:38:00+09:00 Subject: Re: load path On Sep 2, 2010, at 17:35 , Iain Barnett wrote: > Thanks for the responses. > > On 2 Sep 2010, at 10:33, Ryan Davis wrote: > >> >> I got your back: >> >> http://blog.zenspider.com/2009/08/gem-path-rubygems-and-you.html >> > > I tried that just before I mailed in and it didn't work :( Works for me: 502 % grep -A1 ryand /etc/sudoers # Added by ryand: Defaults env_keep += "GEM_PATH GEM_HOME" You need to pay attention to where you put that. It HAS to be after the reset_env line or it obviously won't work. > Last login: Thu Sep 2 18:34:01 on ttys002 > 501 % env | grep GEM > GEM_PATH=/Library/Ruby/Gems/1.8 > 502 % sudo bash > 501 % env | grep GEM > GEM_PATH=/Library/Ruby/Gems/1.8 btw... are you sure you've exported your env vars? > ... > > Is there somewhere I can just add the path hardcoded? I don't really care about configurability, I'm not moving my gems anywhere else soon. Fix it correctly or don't fix it at all. Anything else is just a headache delayed.