Hi,

I've discovered that the load path is different if I run sudo, =
specifically it doesn't pick up the value in GEM_HOME, even though `sudo =
echo $GEM_HOME` shows the correct path. Everything else I've checked =
between sudo/not has been identical, so I was wondering where the load =
path is originally set or when it's first picked up?=20

I'm running ruby v1.9.2 on OSX 10.6. All the info below is identical, =
except for the missing path in $: in `sudo irb`

echo $GEM_HOME
/Users/iainuser/.gems

sudo echo $GEM_HOME
/Users/iainuser/.gems

irb
puts $:
.
/Users/iainuser/.gems
/Users/iainuser/.gems/gems/wirble-0.1.3/bin
/Users/iainuser/.gems/gems/wirble-0.1.3/lib
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/site_ruby/1.=
9.1
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/site_ruby/1.=
9.1/x86_64-darwin10.4.0
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/site_ruby
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/vendor_ruby/=
1.9.1
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/vendor_ruby/=
1.9.1/x86_64-darwin10.4.0
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/vendor_ruby
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/1.9.1
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/1.9.1/x86_64=
-darwin10.4.0


sudo irb
puts $:
.
/Users/iainuser/.gems/gems/wirble-0.1.3/bin
/Users/iainuser/.gems/gems/wirble-0.1.3/lib
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/site_ruby/1.=
9.1
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/site_ruby/1.=
9.1/x86_64-darwin10.4.0
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/site_ruby
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/vendor_ruby/=
1.9.1
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/vendor_ruby/=
1.9.1/x86_64-darwin10.4.0
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/vendor_ruby
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/1.9.1
=
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/lib/ruby/1.9.1/x86_64=
-darwin10.4.0


gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [x86_64-darwin10.4.0]
  - INSTALLATION DIRECTORY: /Users/iainuser/.gems
  - RUBY EXECUTABLE: =
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/iainuser/.gems/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-10
  - GEM PATHS:
     - /Users/iainuser/.gems
     - /Users/iainuser/.gems/gems
...

sudo gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.7
  - RUBY VERSION: 1.9.2 (2010-08-18 patchlevel 0) [x86_64-darwin10.4.0]
  - INSTALLATION DIRECTORY: /Users/iainuser/.gems
  - RUBY EXECUTABLE: =
/Library/Frameworks/Ruby.framework/Versions/1.9.2-p0/bin/ruby
  - EXECUTABLE DIRECTORY: /Users/iainuser/.gems/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-10
  - GEM PATHS:
     - /Users/iainuser/.gems
     - /Users/iainuser/.gems/gems

Any insight is much appreciated.

Regards,
Iain=